error handling & run

This commit is contained in:
2019-02-20 02:32:57 +01:00
parent 480bc84898
commit 13bd7cc309
3 changed files with 26 additions and 6 deletions

View File

@@ -1560,7 +1560,7 @@ class AutomaticDispose {
}).then((Missions) => {
if (Missions.length > 0) {
var Mission = Missions[0];
if (self.MyRunner == 'os' && ( self.includesString($('#missionH1').text(), '[verband]') || self.includesString($('#missionH1').text(), '[event]') )) {
if (self.MyRunner == 'os' && (self.includesString($('#missionH1').text(), '[verband]') || self.includesString($('#missionH1').text(), '[event]'))) {
self.OweSecure = true;
}
self.GetMissionConfiguration(Mission.type);
@@ -2690,5 +2690,15 @@ try {
}
});
} catch (e) {
console.error("Error %s\nLocation: %o", e.stack, window.location.href)
try {
console.error("Error %s\n\nLocation: %o", e.stack, window.location.href)
const runner = ['adis-krankentransporte-frame', 'adis-ownmissions-frame', 'adis-plannedevents-frame', 'adis-verbandmission-frame', 'adis-verbandmission-event-frame']
const runner_iframesName = ['adis-krankentransporte', 'adis-ownmissions', 'adis-plannedevents', 'adis-verbandmission', 'adis-verbandmission-event']
const runnderID = runner_iframesName.indexOf(window.name);
const MyRunner = runner[runnderID];
tellParent(`setTimeout(function(){ window.AutomaticDisposeCall.FreeIframe('${MyRunner}');},250);`);
} catch (e) {
console.error("Error %s\n\nLocation: %o", e.stack, window.location.href)
}
}