Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit ca72ec04 authored by Markus QUARITSCH's avatar Markus QUARITSCH
Browse files

throw exception in declaration mode in case of unkown legislative class

parent 5b5daf56
No related branches found
No related tags found
No related merge requests found
......@@ -131,6 +131,11 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.HeavyLorryRunDa
{
return;
}
if (!vehicle.LegislativeClass.IsOneOf(LegislativeClass.M3,
LegislativeClass.N2, LegislativeClass.N3)) {
throw new VectoException("Unsupported Legislative class '{0}'",
InputDataProvider.JobInputData.Vehicle.LegislativeClass.ToString());
}
_segment = GetSegment(vehicle);
_driverdata = DataAdapter.CreateDriverData(_segment);
......@@ -484,6 +489,11 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.HeavyLorryRunDa
protected override void Initialize()
{
if (!InputDataProvider.JobInputData.Vehicle.LegislativeClass.IsOneOf(LegislativeClass.M3,
LegislativeClass.N2, LegislativeClass.N3)) {
throw new VectoException("Unsupported Legislative class '{0}'",
InputDataProvider.JobInputData.Vehicle.LegislativeClass.ToString());
}
_segment = GetSegment(InputDataProvider.JobInputData.Vehicle, true);
}
......
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