mscorlib(4.0.0.0) API with additions
ExceptionDispatchInfo.cs
2 {
4  [__DynamicallyInvokable]
5  public sealed class ExceptionDispatchInfo
6  {
7  private Exception m_Exception;
8 
9  private string m_remoteStackTrace;
10 
11  private object m_stackTrace;
12 
13  private object m_dynamicMethods;
14 
15  private UIntPtr m_IPForWatsonBuckets;
16 
17  private object m_WatsonBuckets;
18 
19  internal UIntPtr IPForWatsonBuckets => m_IPForWatsonBuckets;
20 
21  internal object WatsonBuckets => m_WatsonBuckets;
22 
23  internal object BinaryStackTraceArray => m_stackTrace;
24 
25  internal object DynamicMethodArray => m_dynamicMethods;
26 
27  internal string RemoteStackTrace => m_remoteStackTrace;
28 
31  [__DynamicallyInvokable]
33  {
34  [__DynamicallyInvokable]
35  get
36  {
37  return m_Exception;
38  }
39  }
40 
41  private ExceptionDispatchInfo(Exception exception)
42  {
43  m_Exception = exception;
44  m_remoteStackTrace = exception.RemoteStackTrace;
45  m_Exception.GetStackTracesDeepCopy(out object currentStackTrace, out object dynamicMethodArray);
46  m_stackTrace = currentStackTrace;
47  m_dynamicMethods = dynamicMethodArray;
48  m_IPForWatsonBuckets = exception.IPForWatsonBuckets;
49  m_WatsonBuckets = exception.WatsonBuckets;
50  }
51 
57  [__DynamicallyInvokable]
58  public static ExceptionDispatchInfo Capture(Exception source)
59  {
60  if (source == null)
61  {
62  throw new ArgumentNullException("source", Environment.GetResourceString("ArgumentNull_Obj"));
63  }
64  return new ExceptionDispatchInfo(source);
65  }
66 
68  [__DynamicallyInvokable]
69  public void Throw()
70  {
71  m_Exception.RestoreExceptionDispatchInfo(this);
72  throw m_Exception;
73  }
74  }
75 }
A platform-specific type that is used to represent a pointer or a handle.
Definition: UIntPtr.cs:14
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
void Throw()
Throws the exception that is represented by the current T:System.Runtime.ExceptionServices....
static ExceptionDispatchInfo Capture(Exception source)
Creates an T:System.Runtime.ExceptionServices.ExceptionDispatchInfo object that represents the specif...
Represents an exception whose state is captured at a certain point in code.
Provides information about, and means to manipulate, the current environment and platform....
Definition: Environment.cs:21
Exception SourceException
Gets the exception that is represented by the current instance.
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
Definition: Exception.cs:22