Example #1
0
        public static string CreateExceptionStubXML(System.Exception exception)
        {
            ExceptionStub stub = CreateExceptionStub(exception);
            var           objectSerializationManager = new ObjectSerializationManager();

            return(objectSerializationManager.SerializeObject(stub));
        }
Example #2
0
        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);
        }