Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 99b469cd authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

write mod data even if an exception occurs

parent ea0e5aeb
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
protected string JobFileName { get; set; }
protected string JobName { get; set; }
protected ISimulationOutPort CyclePort { get; set; }
protected IModalDataWriter DataWriter { get; set; }
//protected IModalDataWriter DataWriter { get; set; }
protected IVehicleContainer Container { get; set; }
protected VectoRun(IVehicleContainer container)
......@@ -49,13 +49,11 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
}
} while (response is ResponseSuccess);
} catch (VectoSimulationException vse) {
if (DataWriter != null) {
DataWriter.Finish();
}
Container.FinishSimulation();
throw new VectoSimulationException("absTime: {0}, distance: {1}, dt: {2}, v: {3}, Gear: {4}", vse, AbsTime,
Container.Distance, dt, Container.VehicleSpeed, Container.Gear, vse.Message);
} catch (VectoException ve) {
DataWriter.Finish();
Container.FinishSimulation();
throw new VectoSimulationException("absTime: {0}, distance: {1}, dt: {2}, v: {3}, Gear: {4}", ve, AbsTime,
Container.Distance, dt, Container.VehicleSpeed, Container.Gear, ve.Message);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment