From 0f84ec1eef7da1d6bdc01bae3711192e7efc89aa Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 11 Mar 2021 13:14:59 +0100 Subject: [PATCH] Plugins: Unwrap CompositionFailedException to make errors more visible --- ILSpy/App.xaml.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ILSpy/App.xaml.cs b/ILSpy/App.xaml.cs index d6d8f834c..7b6070884 100644 --- a/ILSpy/App.xaml.cs +++ b/ILSpy/App.xaml.cs @@ -126,6 +126,13 @@ namespace ICSharpCode.ILSpy // could be used to log the errors directly. Used at the end so that it does not prevent the export provider setup. config.ThrowOnErrors(); } + catch (CompositionFailedException ex) when (ex.InnerException is AggregateException agex) + { + foreach (var inner in agex.InnerExceptions) + { + StartupExceptions.Add(new ExceptionData { Exception = inner }); + } + } catch (Exception ex) { StartupExceptions.Add(new ExceptionData { Exception = ex });