Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash handlers for Dynamo #14826

Merged
merged 24 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/DynamoCoreWpf/Utilities/CrashReportTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ internal static string CreateMiniDumpFile(string outputDir = null)
return outputFile;
}
}

return null;
}

Expand Down
8 changes: 8 additions & 0 deletions src/DynamoSandbox/DynamoCoreSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public void RunApplication(Application app)
{
try
{
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
aparajit-pratap marked this conversation as resolved.
Show resolved Hide resolved

// This line validates if the WebView2 Runtime is installed in the computer before launching DynamoSandbox,
// if is not we return and then exit Dynamo Sandbox
if (!WebView2Utilities.ValidateWebView2RuntimeInstalled())
Expand Down Expand Up @@ -161,5 +163,11 @@ private void ASMPreloadFailureHandler(string failureMessage)
{
MessageBoxService.Show(failureMessage, "DynamoSandbox", MessageBoxButton.OK, MessageBoxImage.Warning);
}

private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
var ex = e.ExceptionObject as Exception;
pinzart90 marked this conversation as resolved.
Show resolved Hide resolved
viewModel?.Model?.OnRequestsCrashPrompt(new CrashErrorReportArgs(ex));
aparajit-pratap marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
Loading