Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
pinzart90 committed Apr 23, 2024
1 parent 63e1b5d commit f474446
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,7 @@ private void CrashGracefully(Exception ex, bool fatal = false)

if (DynamoModel.IsTestMode)
{
// Rethrow the exception during testing.
throw ex;
}
return;
Expand All @@ -866,13 +867,15 @@ private void CrashGracefully(Exception ex, bool fatal = false)
var crashData = new CrashErrorReportArgs(ex);
DynamoConsoleLogger.OnLogErrorToDynamoConsole($"Unhandled exception: {crashData.Details} ");
Analytics.TrackException(ex, true);
Model?.OnRequestsCrashPrompt(crashData);

if (DynamoModel.IsTestMode)
{
// Rethrow the exception during testing.
throw ex;
}

Model?.OnRequestsCrashPrompt(crashData);

if (fatal)
{
// Fatal exception. Close Dynamo but do not terminate the process.
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Views/SplashScreen/SplashScreen.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ private void WebView_NavigationCompleted(object sender, CoreWebView2NavigationCo
}
catch (Exception ex)
{
if (DynamoModel.IsTestMode)
{
// Rethrow exception during testing.
throw;
}

if (!DynamoModel.IsCrashing && !IsClosing)
{
CrashReportTool.ShowCrashWindow(viewModel, new CrashErrorReportArgs(ex));
Expand Down

0 comments on commit f474446

Please sign in to comment.