From 638d653a1026bcc5a1b562e643f9d58d0653d4a9 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Mon, 20 Apr 2020 09:11:03 +0200 Subject: [PATCH] update error message in case no completed segment can be found --- .../Impl/DeclarationModeCompletedBusVectoRunDataFactory.cs | 5 +++-- .../Impl/DeclarationModeSingleBusVectoRunDataFactory.cs | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeCompletedBusVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeCompletedBusVectoRunDataFactory.cs index eb0ce95dcb..e10eecf1d5 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeCompletedBusVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeCompletedBusVectoRunDataFactory.cs @@ -226,9 +226,10 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl vehicle.Height, vehicle.FloorType == FloorType.LowFloor); if (!segment.Found) { throw new VectoException( - "no segment found for vehicle configruation: vehicle category: {0}, axle configuration: {1}, articulated: {2}, primary", + "no segment found for vehicle configruation: vehicle category: {0}, axle configuration: {1}, articulated: {2}, vehicle code: {3}, registered class: {4}, passengersLowerDeck: {5}, height: {6}, lowfloor: {7}. completed", vehicle.VehicleCategory, axleConfiguration, - vehicle.Articulated); + vehicle.Articulated, vehicle.VehicleCode, vehicle.RegisteredClass.GetLabel(), vehicle.NumberOfPassengersLowerDeck, + vehicle.Height, vehicle.FloorType == FloorType.LowFloor); } return segment; diff --git a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeSingleBusVectoRunDataFactory.cs b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeSingleBusVectoRunDataFactory.cs index abb40c8b9d..88d672cd7f 100644 --- a/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeSingleBusVectoRunDataFactory.cs +++ b/VectoCore/VectoCore/InputData/Reader/Impl/DeclarationModeSingleBusVectoRunDataFactory.cs @@ -45,9 +45,10 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl { completedVehicle.Height, completedVehicle.FloorType == FloorType.LowFloor); if (!segment.Found) { throw new VectoException( - "no segment found for vehicle configruation: vehicle category: {0}, axle configuration: {1}, articulated: {2}, primary", + "no segment found for vehicle configruation: vehicle category: {0}, axle configuration: {1}, articulated: {2}, vehicle code: {3}, registered class: {4}, passengersLowerDeck: {5}, height: {6}, lowfloor: {7}. completed", vehicle.VehicleCategory, _singleBusInputData.PrimaryVehicle.AxleConfiguration, - vehicle.Articulated); + vehicle.Articulated, completedVehicle.VehicleCode, completedVehicle.RegisteredClass.GetLabel(), completedVehicle.NumberOfPassengersLowerDeck, + completedVehicle.Height, completedVehicle.FloorType == FloorType.LowFloor); } foreach (var mission in segment.Missions) { mission.VehicleHeight = completedVehicle.Height + mission.BusParameter.DeltaHeight; -- GitLab