Skip to content

Commit

Permalink
Handle route loading failures in route builder
Browse files Browse the repository at this point in the history
  • Loading branch information
sandermvanvliet committed Dec 8, 2023
1 parent bb4daf1 commit 132136f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,15 @@ public MainWindowViewModel(
var routeModel = LandingPageViewModel.SelectedRoute?.AsRouteModel();
if (routeModel != null)
{
Route.LoadFromRouteModel(routeModel);
try
{
Route.LoadFromRouteModel(routeModel);
statusBarService.Info("Loaded route successfully");
}
catch (Exception e)
{
statusBarService.Error($"Unable to load route: {e.Message}");
}
}
break;
}
Expand Down

0 comments on commit 132136f

Please sign in to comment.