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

DYN-7368: CER crash - catch exception from dynamomessagebox #15850

Merged
merged 2 commits into from
Mar 3, 2025
Merged
Changes from all 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
19 changes: 15 additions & 4 deletions src/DynamoCoreWpf/UI/Prompts/DynamoMessageBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
using System.Windows.Input;
using Dynamo.Annotations;
using Dynamo.Controls;
using Dynamo.Events;
using Dynamo.Logging;
using Dynamo.Session;
using Dynamo.Utilities;

namespace Dynamo.UI.Prompts
Expand Down Expand Up @@ -116,10 +118,19 @@ public enum DialogFlags
/// </summary>
public DynamoMessageBox()
{
InitializeComponent();
DataContext = this;
ShowTooltip = false;
ToolTip = "";
// CER: 52164327 - Catching all exceptions to prevent the application from crashing
try
{
InitializeComponent();
DataContext = this;
ShowTooltip = false;
ToolTip = "";
}
catch (Exception ex)
{
var dynamoLogger = ExecutionEvents.ActiveSession?.GetParameterValue(ParameterKeys.Logger) as DynamoLogger;
dynamoLogger?.Log("Failed to initialize DynamoMessageBox: " + ex.Message, LogLevel.Console);
}
}

/// <summary>
Expand Down
Loading