Commit 3b3e99b0 authored by ham's avatar ham
Browse files

Error handling

parent 081f3911
Pipeline #67532 passed with stages
in 1 minute and 20 seconds
......@@ -151,7 +151,9 @@ public class ScenarioUpload {
ParserSettings pSettings = new ParserSettings("/" + osmTempFilePath, ZCoordinates.ALLZERO);
scenario = prepareScenario(simTempFilePath, WorldModel.prepareWorldMap(pSettings));
} catch (Exception e) {
this.console.trace(ExtensionLogLevel.ERROR, "Failed to parse map [" + osmTempFilePath + "]: " + e);
// In case uploaded sim file referenced coordinates which are not in previous parsed map,
// try to parse the uploaded map and initialize the scenario
scenario = this.parseNewScenarioAndMap(simTempFilePath, osmTempFilePath);
}
}
......@@ -348,6 +350,7 @@ public class ScenarioUpload {
this.pathFinder.setMapId(mapId);
this.pathFinder.setSectors(new SectorBO().getSectors(mapId));
return prepareScenario(simFilePath, WorldModel.prepareWorldMap(parserSettings));
ParserSettings pSettings = new ParserSettings("/" + osmFilePath, ZCoordinates.ALLZERO);
return prepareScenario(simFilePath, WorldModel.prepareWorldMap(pSettings));
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment