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

◆ SetException()

void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.SetException ( Exception exception)
inline

Definition at line 61 of file AsyncVoidMethodBuilder.cs.

62 {
63 if (exception == null)
64 {
65 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.exception);
66 }
67 if (TplEventSource.Log.IsEnabled())
68 {
69 TplEventSource.Log.TraceOperationEnd(Task.Id, AsyncCausalityStatus.Error);
70 }
71 if (_synchronizationContext != null)
72 {
73 try
74 {
76 }
77 finally
78 {
80 }
81 }
82 else
83 {
85 }
87 }
static void ThrowAsync(Exception exception, SynchronizationContext targetContext)
Definition Task.cs:1806
static readonly TplEventSource Log

References System.Runtime.CompilerServices.AsyncVoidMethodBuilder._builder, System.Runtime.CompilerServices.AsyncVoidMethodBuilder._synchronizationContext, System.exception, System.Threading.Tasks.Task< TResult >.Id, System.Threading.Tasks.TplEventSource.Log, System.Runtime.CompilerServices.AsyncVoidMethodBuilder.NotifySynchronizationContextOfCompletion(), System.Runtime.CompilerServices.AsyncTaskMethodBuilder< TResult >.SetResult(), System.ThrowHelper.ThrowArgumentNullException(), and System.Threading.Tasks.Task< TResult >.ThrowAsync().