File tree Expand file tree Collapse file tree 1 file changed +3
-27
lines changed
src/Components/test/testassets/BasicTestApp/ErrorBoundaryTest Expand file tree Collapse file tree 1 file changed +3
-27
lines changed Original file line number Diff line number Diff line change 154
154
155
155
async Task SyncExceptionDispatch ()
156
156
{
157
- try
158
- {
159
- await InvokeAsync (() =>
160
- {
161
- throw new InvalidTimeZoneException (" Synchronous exception in SyncExceptionDispatch" );
162
- });
163
- }
164
- catch (Exception e )
165
- {
166
- await DispatchExceptionAsync (e );
167
- }
157
+ await DispatchExceptionAsync (new InvalidTimeZoneException (" Synchronous exception in SyncExceptionDispatch" ));
168
158
}
169
159
170
160
async Task AsyncExceptionDispatch ()
171
161
{
172
- try
173
- {
174
- await InvokeAsync (async () =>
175
- {
176
- await ThrowExceptionAsync ();
177
- });
178
- }
179
- catch (Exception e )
180
- {
181
- await DispatchExceptionAsync (e );
182
- }
183
- }
184
-
185
- private Task ThrowExceptionAsync ()
186
- {
187
- throw new InvalidTimeZoneException (" Asynchronous exception in AsyncExceptionDispatch" );
162
+ await Task .Yield ();
163
+ await DispatchExceptionAsync (new InvalidTimeZoneException (" Asynchronous exception in AsyncExceptionDispatch" ));
188
164
}
189
165
}
You can’t perform that action at this time.
0 commit comments