Using Assembly CrittercismWP8SDK.dll, v2.0.0.0
In Old code below, Crittercism throws an NullReferenceException: at
[System.NullReferenceException] = {System.NullReferenceException: Object reference not set to an instance of an object. at CrittercismSDK.DataContracts.ExceptionObject..ctor(String exceptionName, String exceptionReason, String stacktrace) at CrittercismSDK.Crittercism.LogHandledExce...
StackTrace = " at CrittercismSDK.DataContracts.ExceptionObject..ctor(String exceptionName, String exceptionReason, String stacktrace)\r\n
at CrittercismSDK.Crittercism.LogHandledException(Exception e)\r\n
Old code
Exception exception = new Exception(description);
exception.Data.Add(MethodName, methodName);
Crittercism.LogHandledException(exception); //NullReferenceException
New code, no exception:
try
{
Exception ex = new Exception(description);
ex.Data.Add(MethodName, methodName);
throw ex;
}
catch (Exception e)
{
Crittercism.LogHandledException(e); //No NullReferenceException
}
My theory is that the system populates the Exception object in a way I cannot or that I have missed. Any ideas why the Old code causes Crittercism to throw a NullReferenceException?