浏览代码

[Logs] Added Exception saving

develop
Robin Thoni 9 年前
父节点
当前提交
d8c0af4af3
共有 1 个文件被更改,包括 11 次插入1 次删除
  1. 11
    1
      Logs/DBO/OpResult.cs

+ 11
- 1
Logs/DBO/OpResult.cs 查看文件

@@ -37,8 +37,16 @@ namespace iiie.Logs.DBO
37 37
         /// </summary>
38 38
         public string PrivateDetails { get; set; }
39 39
 
40
+        /// <summary>
41
+        /// Original error stack trace
42
+        /// </summary>
40 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 50
         /// <summary>
43 51
         /// The data returned by the call
44 52
         /// Only relevent if Success is true
@@ -95,7 +103,9 @@ namespace iiie.Logs.DBO
95 103
                 message += inner.GetType().Name + ": " + inner.Message + (inner.InnerException != null ? "\n" : "");
96 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 111
         /// <summary>

正在加载...
取消
保存