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

Skip to content
Snippets Groups Projects
Commit e0975255 authored by Harald MARTINI's avatar Harald MARTINI
Browse files

Catch exception if Primary or Stagefile in New Vif Job is not present

parent 7fb94532
No related branches found
No related tags found
No related merge requests found
......@@ -154,16 +154,23 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
{
var inputDataProvider = inputData as JSONInputDataV10_PrimaryAndStageInputBus;
Debug.Assert(inputDataProvider != null);
if (inputDataProvider.StageInputData != null && (inputDataProvider.StageInputData.ExemptedVehicle !=
inputDataProvider.PrimaryVehicle.JobInputData.Vehicle.ExemptedVehicle)) {
throw new VectoException("Can't combine exempted and non-exempted input data");
try {
if (inputDataProvider.StageInputData != null && (inputDataProvider.StageInputData.ExemptedVehicle !=
inputDataProvider.PrimaryVehicle.JobInputData.Vehicle
.ExemptedVehicle)) {
throw new VectoException("Can't combine exempted and non-exempted input data");
}
StageInputPath = inputDataProvider.StageInputData?.DataSource?.SourceFile;
PrimaryInputPath = inputDataProvider.PrimaryVehicle?.DataSource?.SourceFile;
} catch (Exception ex) {
_dialogHelper.ShowErrorMessage(ex.Message);
}
Completed = inputDataProvider.Completed ?? false;
StageInputPath = inputDataProvider.StageInputData?.DataSource?.SourceFile;
PrimaryInputPath = inputDataProvider.PrimaryVehicle?.DataSource?.SourceFile;
DataSource = inputData.DataSource;
UpdateTitleAndDocumentName();
}
......
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