From 4017e98c7f6f4c2268a7ed3cc8111e0d8eda2d95 Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Wed, 26 Apr 2017 18:08:36 -0500 Subject: [PATCH] (GH-1145) show inner exception message --- .../infrastructure.app/builders/ConfigurationBuilder.cs | 2 +- .../infrastructure.app/configuration/EnvironmentSettings.cs | 2 +- .../infrastructure/registration/SimpleInjectorContainer.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs b/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs index 5bcc410fa1..264c8b6dc2 100644 --- a/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs +++ b/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs @@ -535,7 +535,7 @@ private static void set_licensed_options(ChocolateyConfiguration config, Chocola if (isDebug && ex.InnerException != null) { - message += "{0}{1}".format_with(Environment.NewLine, ex.ToString()); + message += "{0}{1}".format_with(Environment.NewLine, ex.InnerException.ToString()); } "chocolatey".Log().Error( diff --git a/src/chocolatey/infrastructure.app/configuration/EnvironmentSettings.cs b/src/chocolatey/infrastructure.app/configuration/EnvironmentSettings.cs index 098dbcf60c..2f20225c42 100644 --- a/src/chocolatey/infrastructure.app/configuration/EnvironmentSettings.cs +++ b/src/chocolatey/infrastructure.app/configuration/EnvironmentSettings.cs @@ -164,7 +164,7 @@ private static void set_licensed_environment(ChocolateyConfiguration config) if (isDebug && ex.InnerException != null) { - message += "{0}{1}".format_with(Environment.NewLine, ex.ToString()); + message += "{0}{1}".format_with(Environment.NewLine, ex.InnerException.ToString()); } "chocolatey".Log().Error( diff --git a/src/chocolatey/infrastructure/registration/SimpleInjectorContainer.cs b/src/chocolatey/infrastructure/registration/SimpleInjectorContainer.cs index 3f29b94cf2..217040a32b 100644 --- a/src/chocolatey/infrastructure/registration/SimpleInjectorContainer.cs +++ b/src/chocolatey/infrastructure/registration/SimpleInjectorContainer.cs @@ -107,7 +107,7 @@ private static void load_component_registry(Type componentRegistry, Container co if (isDebug && ex.InnerException != null) { - message += "{0}{1}".format_with(Environment.NewLine, ex.ToString()); + message += "{0}{1}".format_with(Environment.NewLine, ex.InnerException.ToString()); } "chocolatey".Log().Error(