diff --git a/CHANGELOG.md b/CHANGELOG.md index 14c0b8f..2e71383 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed + - Re-raise base exception from ReflectionUtils.CreateInstance, TargetInvocationException and TypeLoadException don't say much ## [3.7.0] - 2018-07-02 ### Added diff --git a/ICD.Common.Utils/ReflectionUtils.cs b/ICD.Common.Utils/ReflectionUtils.cs index 534ca34..5e284fb 100644 --- a/ICD.Common.Utils/ReflectionUtils.cs +++ b/ICD.Common.Utils/ReflectionUtils.cs @@ -253,7 +253,11 @@ namespace ICD.Common.Utils } catch (TypeLoadException e) { - throw new TypeLoadException(e.GetBaseException().Message); + throw e.GetBaseException(); + } + catch (TargetInvocationException e) + { + throw e.GetBaseException(); } string message = string.Format("Unable to find constructor for {0}", type.Name);