mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Show inner exception in error dialog
This commit is contained in:
parent
e3cf2ac3a2
commit
e4dc6c0600
@ -18,11 +18,16 @@ namespace Bloxstrap.UI
|
|||||||
{
|
{
|
||||||
public ExceptionDialog(Exception exception)
|
public ExceptionDialog(Exception exception)
|
||||||
{
|
{
|
||||||
|
Exception? innerException = exception.InnerException;
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
Title = RootTitleBar.Title = $"{App.ProjectName} Exception";
|
Title = RootTitleBar.Title = $"{App.ProjectName} Exception";
|
||||||
ErrorRichTextBox.Selection.Text = $"{exception.GetType()}: {exception.Message}";
|
ErrorRichTextBox.Selection.Text = $"{exception.GetType()}: {exception.Message}";
|
||||||
|
|
||||||
|
if (innerException is not null)
|
||||||
|
ErrorRichTextBox.Selection.Text += $"\n\n===== Inner Exception =====\n{innerException.GetType()}: {innerException.Message}";
|
||||||
|
|
||||||
if (!App.Logger.Initialized)
|
if (!App.Logger.Initialized)
|
||||||
LocateLogFileButton.Content = "Copy log contents";
|
LocateLogFileButton.Content = "Copy log contents";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user