Merge pull request #1991 from esdrubal/seq_test_fix
[mono.git] / mcs / class / corlib / System / Exception.cs
index 7670ce338e693a9c88343b870db8fb51d178ac95..e07d2e85b62917446160a44c05574c47afa90d0f 100644 (file)
@@ -69,6 +69,7 @@ namespace System
                IDictionary _data;
                internal StackTrace[] captured_traces;
                IntPtr[] native_trace_ips;
+               object dynamic_methods;
                #endregion
 #pragma warning restore 169, 649
 
@@ -199,26 +200,8 @@ namespace System
                                        /* Not thrown yet */
                                        return null;
 
-                               StringBuilder sb = new StringBuilder ();
-
-                               // Add traces captured using ExceptionDispatchInfo
-                               if (captured_traces != null) {
-                                       foreach (var t in captured_traces) {
-                                               if (!t.AddFrames (sb, true))
-                                                       continue;
-
-                                               sb.Append (Environment.NewLine);
-                                               sb.Append ("--- End of stack trace from previous location where exception was thrown ---");
-                                               sb.Append (Environment.NewLine);
-                                       }
-                               }
-
-                               StackTrace st = new StackTrace (this, 0, true, true);
-                               st.AddFrames (sb, true);
-
-                               stack_trace = sb.ToString ();
-
-                               return stack_trace;
+                               StackTrace st = new StackTrace (this, 0, true);
+                               return stack_trace = st.ToString ();
                        }
                }
 
@@ -316,6 +299,7 @@ namespace System
                {
                        captured_traces = (StackTrace[]) exceptionDispatchInfo.BinaryStackTraceArray;
                        trace_ips = null;
+                       stack_trace = null;
                }
 
                //