1 write to _options
Microsoft.AspNetCore.Diagnostics (1)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
43
_options
= options.Value;
15 references to _options
Microsoft.AspNetCore.Diagnostics (15)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (15)
51
if (
_options
.ExceptionHandler == null)
53
if (
_options
.ExceptionHandlingPath == null)
62
_options
.ExceptionHandler = _next;
141
if (
_options
.ExceptionHandlingPath.HasValue)
143
context.Request.Path =
_options
.ExceptionHandlingPath;
145
var oldScope =
_options
.CreateScopeForErrors ? context.RequestServices : null;
146
await using AsyncServiceScope? scope =
_options
.CreateScopeForErrors ? context.RequestServices.GetRequiredService<IServiceScopeFactory>().CreateAsyncScope() : null;
169
context.Response.StatusCode =
_options
.StatusCodeSelector?.Invoke(edi.SourceException)
191
if (
_options
.ExceptionHandler is not null)
193
await
_options
.ExceptionHandler!(context);
198
if (
_options
.ExceptionHandlingPath.HasValue)
201
handlerTag =
_options
.ExceptionHandlingPath.Value;
225
if (result != ExceptionHandledType.Unhandled ||
_options
.StatusCodeSelector is not null || is404FromBadHttpRequestException || context.Response.StatusCode != StatusCodes.Status404NotFound ||
_options
.AllowStatusCode404Response)
232
if (
_options
.SuppressDiagnosticsCallback is { } suppressCallback)