Browse Source

[Logs] Added Exception saving

develop
Robin Thoni 9 years ago
parent
commit
d8c0af4af3
1 changed files with 11 additions and 1 deletions
  1. 11
    1
      Logs/DBO/OpResult.cs

+ 11
- 1
Logs/DBO/OpResult.cs View File

37
         /// </summary>
37
         /// </summary>
38
         public string PrivateDetails { get; set; }
38
         public string PrivateDetails { get; set; }
39
 
39
 
40
+        /// <summary>
41
+        /// Original error stack trace
42
+        /// </summary>
40
         public StackFrame[] StackFrames { get; set; }
43
         public StackFrame[] StackFrames { get; set; }
41
 
44
 
45
+        /// <summary>
46
+        /// Caught exception, if any
47
+        /// </summary>
48
+        public Exception Exception { get; set; }
49
+
42
         /// <summary>
50
         /// <summary>
43
         /// The data returned by the call
51
         /// The data returned by the call
44
         /// Only relevent if Success is true
52
         /// Only relevent if Success is true
95
                 message += inner.GetType().Name + ": " + inner.Message + (inner.InnerException != null ? "\n" : "");
103
                 message += inner.GetType().Name + ": " + inner.Message + (inner.InnerException != null ? "\n" : "");
96
                 inner = inner.InnerException;
104
                 inner = inner.InnerException;
97
             }
105
             }
98
-            return Error(status, message, userDetails);
106
+            var res = Error(status, message, userDetails);
107
+            res.Exception = e;
108
+            return res;
99
         }
109
         }
100
 
110
 
101
         /// <summary>
111
         /// <summary>

Loading…
Cancel
Save