feat: Re-raise base exception from ReflectionUtils.CreateInstance, TargetInvocationException and TypeLoadException don't say much

This commit is contained in:
Chris Cameron
2018-07-03 14:55:04 -04:00
parent 268e201f49
commit 21a583a57c
2 changed files with 7 additions and 1 deletions

View File

@@ -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);