mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 13:15:07 +00:00
feat: Re-raise base exception from ReflectionUtils.CreateInstance, TargetInvocationException and TypeLoadException don't say much
This commit is contained in:
@@ -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).
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
### Changed
|
||||||
|
- Re-raise base exception from ReflectionUtils.CreateInstance, TargetInvocationException and TypeLoadException don't say much
|
||||||
|
|
||||||
## [3.7.0] - 2018-07-02
|
## [3.7.0] - 2018-07-02
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -253,7 +253,11 @@ namespace ICD.Common.Utils
|
|||||||
}
|
}
|
||||||
catch (TypeLoadException e)
|
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);
|
string message = string.Format("Unable to find constructor for {0}", type.Name);
|
||||||
|
|||||||
Reference in New Issue
Block a user