From 06979c2c35f8222ded62d37db4be6a6622c5cfd7 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Thu, 28 May 2020 18:23:04 -0400 Subject: [PATCH] be a bit more verbose when catching inner exceptions --- .../UniversalEditor.UserInterface/Common/Reflection.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Libraries/UniversalEditor.UserInterface/Common/Reflection.cs b/Libraries/UniversalEditor.UserInterface/Common/Reflection.cs index cfb86be6..adde122a 100644 --- a/Libraries/UniversalEditor.UserInterface/Common/Reflection.cs +++ b/Libraries/UniversalEditor.UserInterface/Common/Reflection.cs @@ -38,6 +38,15 @@ namespace UniversalEditor.UserInterface.Common catch (System.Reflection.TargetInvocationException ex) { Console.WriteLine("binding error while loading editor '{0}': {1}", type.FullName, ex.InnerException.Message); + if (ex.InnerException.InnerException != null) + { + Console.WriteLine("^--- {0}", ex.InnerException.InnerException.Message); + Console.WriteLine(); + Console.WriteLine(" *** STACK TRACE *** "); + Console.WriteLine(ex.StackTrace); + Console.WriteLine(" ******************* "); + Console.WriteLine(); + } } catch (Exception ex) {