ExceptionHandlerExtensions.UseExceptionHandler Method

Definition

Overloads

UseExceptionHandler(IApplicationBuilder)

Adds a middleware to the pipeline that will catch exceptions, log them, and re-execute the request in an alternate pipeline. The request will not be re-executed if the response has already started.

UseExceptionHandler(IApplicationBuilder, ExceptionHandlerOptions)

Adds a middleware to the pipeline that will catch exceptions, log them, and re-execute the request in an alternate pipeline. The request will not be re-executed if the response has already started.

UseExceptionHandler(IApplicationBuilder, Action<IApplicationBuilder>)

Adds a middleware to the pipeline that will catch exceptions, log them, and re-execute the request in an alternate pipeline. The request will not be re-executed if the response has already started.

UseExceptionHandler(IApplicationBuilder, String)

Adds a middleware to the pipeline that will catch exceptions, log them, reset the request path, and re-execute the request. The request will not be re-executed if the response has already started.

UseExceptionHandler(IApplicationBuilder)

Adds a middleware to the pipeline that will catch exceptions, log them, and re-execute the request in an alternate pipeline. The request will not be re-executed if the response has already started.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseExceptionHandler(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseExceptionHandler (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseExceptionHandler : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseExceptionHandler (app As IApplicationBuilder) As IApplicationBuilder

Parameters

Returns

IApplicationBuilder

Applies to

UseExceptionHandler(IApplicationBuilder, ExceptionHandlerOptions)

Adds a middleware to the pipeline that will catch exceptions, log them, and re-execute the request in an alternate pipeline. The request will not be re-executed if the response has already started.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseExceptionHandler(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::ExceptionHandlerOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseExceptionHandler (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.ExceptionHandlerOptions options);
static member UseExceptionHandler : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.ExceptionHandlerOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseExceptionHandler (app As IApplicationBuilder, options As ExceptionHandlerOptions) As IApplicationBuilder

Parameters

Returns

IApplicationBuilder

Applies to

UseExceptionHandler(IApplicationBuilder, Action<IApplicationBuilder>)

Adds a middleware to the pipeline that will catch exceptions, log them, and re-execute the request in an alternate pipeline. The request will not be re-executed if the response has already started.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseExceptionHandler(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Action<Microsoft::AspNetCore::Builder::IApplicationBuilder ^> ^ configure);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseExceptionHandler (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> configure);
static member UseExceptionHandler : Microsoft.AspNetCore.Builder.IApplicationBuilder * Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseExceptionHandler (app As IApplicationBuilder, configure As Action(Of IApplicationBuilder)) As IApplicationBuilder

Parameters

Returns

IApplicationBuilder

Applies to

UseExceptionHandler(IApplicationBuilder, String)

Adds a middleware to the pipeline that will catch exceptions, log them, reset the request path, and re-execute the request. The request will not be re-executed if the response has already started.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseExceptionHandler(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, System::String ^ errorHandlingPath);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseExceptionHandler (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string errorHandlingPath);
static member UseExceptionHandler : Microsoft.AspNetCore.Builder.IApplicationBuilder * string -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseExceptionHandler (app As IApplicationBuilder, errorHandlingPath As String) As IApplicationBuilder

Parameters

errorHandlingPath
String

Returns

IApplicationBuilder

Applies to