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

◆ DisposePendingDisposablesOnException()

void System.Text.Json.WriteStack.DisposePendingDisposablesOnException ( )
inline

Definition at line 159 of file WriteStack.cs.

160 {
161 Exception exception2 = null;
163 int num = Math.Max(_count, _continuationCount);
164 for (int i = 0; i < num - 1; i++)
165 {
166 DisposeFrame(_stack[i].CollectionEnumerator, ref exception2);
167 }
168 if (exception2 != null)
169 {
171 }
173 {
174 try
175 {
176 if (collectionEnumerator is IDisposable disposable)
177 {
178 disposable.Dispose();
179 }
180 }
181 catch (Exception ex)
182 {
183 exception = ex;
184 }
185 }
186 }
static ExceptionDispatchInfo Capture(Exception source)
WriteStackFrame Current
Definition WriteStack.cs:15
WriteStackFrame[] _stack
Definition WriteStack.cs:17

References System.Text.Json.WriteStack._continuationCount, System.Text.Json.WriteStack._count, System.Text.Json.WriteStack._stack, System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(), System.Text.Json.WriteStackFrame.CollectionEnumerator, System.Text.Json.WriteStack.Current, System.Text.Json.Dictionary, System.exception, and System.Math.Max().