Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ExceptionDispatchInfo.cs
Go to the documentation of this file.
3
5
6public sealed class ExceptionDispatchInfo
7{
8 private readonly Exception _exception;
9
11
13
19
21 {
22 if (source == null)
23 {
24 throw new ArgumentNullException("source");
25 }
26 return new ExceptionDispatchInfo(source);
27 }
28
29 [DoesNotReturn]
30 [StackTraceHidden]
31 public void Throw()
32 {
34 throw _exception;
35 }
36
37 [DoesNotReturn]
38 [StackTraceHidden]
39 public static void Throw(Exception source)
40 {
41 Capture(source).Throw();
42 }
43
44 [StackTraceHidden]
46 {
47 if (source == null)
48 {
49 throw new ArgumentNullException("source");
50 }
51 source.SetCurrentStackTrace();
52 return source;
53 }
54
55 public static Exception SetRemoteStackTrace(Exception source, string stackTrace)
56 {
57 if (source == null)
58 {
59 throw new ArgumentNullException("source");
60 }
61 if (stackTrace == null)
62 {
63 throw new ArgumentNullException("stackTrace");
64 }
65 source.SetRemoteStackTrace(stackTrace);
66 return source;
67 }
68}
void RestoreDispatchState(in DispatchState dispatchState)
Definition Exception.cs:264
DispatchState CaptureDispatchState()
Definition Exception.cs:289
static Exception SetRemoteStackTrace(Exception source, string stackTrace)
static ExceptionDispatchInfo Capture(Exception source)