Compare commits

...

1 Commits

Author SHA1 Message Date
Andrew Welker
e84c565a43 fix: Add logic to check inner exception
Some exceptions seem to be getting swallowed by the over-arching TypeLoadException. This checks for an InnerException and prints it's message if there is one.
2021-07-27 13:16:55 -06:00

View File

@@ -156,6 +156,15 @@ namespace PepperDash.Essentials.Core
Debug.Console(0, Debug.ErrorLogLevel.Error, "Exception occurred while creating device {0}: {1}", dc.Key, ex.Message);
Debug.Console(2, "{0}", ex.StackTrace);
if (ex.InnerException == null)
{
return null;
}
Debug.Console(0, Debug.ErrorLogLevel.Error, "Inner exception while creating device {0}: {1}", dc.Key,
ex.InnerException.Message);
Debug.Console(2, "{0}", ex.InnerException.StackTrace);
return null;
}
}