Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AddFaultException()

void System.Threading.Tasks.TaskExceptionHolder.AddFaultException ( object exceptionObject)
inlineprivate

Definition at line 59 of file TaskExceptionHolder.cs.

60 {
62 if (list == null)
63 {
65 }
66 if (exceptionObject is Exception source)
67 {
69 }
71 {
72 list.Add(item);
73 }
74 else if (exceptionObject is IEnumerable<Exception> enumerable)
75 {
76 foreach (Exception item2 in enumerable)
77 {
79 }
80 }
81 else
82 {
84 {
85 throw new ArgumentException(SR.TaskExceptionHolder_UnknownExceptionType, "exceptionObject");
86 }
87 list.AddRange(collection);
88 }
89 if (list.Count > 0)
90 {
92 }
93 }
void Add(TKey key, TValue value)
static ExceptionDispatchInfo Capture(Exception source)
volatile List< ExceptionDispatchInfo > m_faultExceptions

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(), System.collection, System.item, System.list, System.Threading.Tasks.TaskExceptionHolder.m_faultExceptions, System.Threading.Tasks.TaskExceptionHolder.MarkAsUnhandled(), System.source, and System.SR.TaskExceptionHolder_UnknownExceptionType.

Referenced by System.Threading.Tasks.TaskExceptionHolder.Add().