public static string CreateExceptionStubXML(System.Exception exception) { ExceptionStub stub = CreateExceptionStub(exception); var objectSerializationManager = new ObjectSerializationManager(); return(objectSerializationManager.SerializeObject(stub)); }
public static ExceptionStub CreateExceptionStub(System.Exception exception) { ExceptionStub stub = new ExceptionStub(); stub.Message = exception.Message; stub.Source = exception.Source; stub.Stack = exception.StackTrace; if (exception.InnerException != null) { stub.InnerException = CreateExceptionStub(exception.InnerException); } return(stub); }