From 7ec7201d641605299cbe13d809ac8fd567f67720 Mon Sep 17 00:00:00 2001 From: Masusder <59669685+Masusder@users.noreply.github.com> Date: Sun, 9 Aug 2026 18:17:24 +0200 Subject: [PATCH] Additional exception info in a dropdown --- CUE4Parse | 2 +- FModel/ViewModels/ExportSessionViewModel.cs | 25 ++++++++ FModel/Views/ExportSessionWindow.xaml | 63 +++++++++++++++++++-- 3 files changed, 84 insertions(+), 6 deletions(-) diff --git a/CUE4Parse b/CUE4Parse index 9a5f8b9f..b046ebb4 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 9a5f8b9f38d69eea18e075f37266e694f7177729 +Subproject commit b046ebb4307565e9cccd44aeac3afc828d3ab327 diff --git a/FModel/ViewModels/ExportSessionViewModel.cs b/FModel/ViewModels/ExportSessionViewModel.cs index 4559463a..8638dad5 100644 --- a/FModel/ViewModels/ExportSessionViewModel.cs +++ b/FModel/ViewModels/ExportSessionViewModel.cs @@ -502,4 +502,29 @@ public class LogEntryViewModel(LogEvent log) _ => log.Exception?.Message ?? log.RenderMessage() }; public Exception? Exception { get; } = log.Exception; + public IReadOnlyList ExceptionDetails { get; } = + log.Exception is { } exception ? [new ExceptionDetailsViewModel(exception)] : []; +} + +public class ExceptionDetailsViewModel +{ + public string Header { get; } + public string Details { get; } + + public ExceptionDetailsViewModel(Exception exception) + { + var text = exception.ToString().ReplaceLineEndings("\n"); + var newline = text.IndexOf('\n'); + + if (newline < 0) + { + Header = text; + Details = string.Empty; + } + else + { + Header = text[..newline]; + Details = text[(newline + 1)..]; + } + } } diff --git a/FModel/Views/ExportSessionWindow.xaml b/FModel/Views/ExportSessionWindow.xaml index bf1cb9af..29275547 100644 --- a/FModel/Views/ExportSessionWindow.xaml +++ b/FModel/Views/ExportSessionWindow.xaml @@ -131,8 +131,25 @@ + + - + @@ -389,7 +406,8 @@ VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" VirtualizingPanel.ScrollUnit="Item" - ScrollViewer.CanContentScroll="True"> + ScrollViewer.CanContentScroll="True" + ScrollViewer.HorizontalScrollBarVisibility="Disabled">