共用方式為


ExceptionHandlerExtensions.UseExceptionHandler 方法

定義

多載

UseExceptionHandler(IApplicationBuilder)

將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況,並在替代管線中重新執行要求。 如果回應已啟動,則不會重新執行要求。

UseExceptionHandler(IApplicationBuilder, ExceptionHandlerOptions)

將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況,並在替代管線中重新執行要求。 如果回應已啟動,則不會重新執行要求。

UseExceptionHandler(IApplicationBuilder, Action<IApplicationBuilder>)

將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況,並在替代管線中重新執行要求。 如果回應已啟動,則不會重新執行要求。

UseExceptionHandler(IApplicationBuilder, String)

將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況、重設要求路徑,然後重新執行要求。 如果回應已啟動,則不會重新執行要求。

UseExceptionHandler(IApplicationBuilder, String, Boolean)

將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況、重設要求路徑,然後重新執行要求。 如果回應已啟動,則不會重新執行要求。

UseExceptionHandler(IApplicationBuilder)

來源:
ExceptionHandlerExtensions.cs
來源:
ExceptionHandlerExtensions.cs
來源:
ExceptionHandlerExtensions.cs

將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況,並在替代管線中重新執行要求。 如果回應已啟動,則不會重新執行要求。

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

參數

傳回

適用於

UseExceptionHandler(IApplicationBuilder, ExceptionHandlerOptions)

來源:
ExceptionHandlerExtensions.cs
來源:
ExceptionHandlerExtensions.cs
來源:
ExceptionHandlerExtensions.cs

將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況,並在替代管線中重新執行要求。 如果回應已啟動,則不會重新執行要求。

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

參數

傳回

適用於

UseExceptionHandler(IApplicationBuilder, Action<IApplicationBuilder>)

來源:
ExceptionHandlerExtensions.cs
來源:
ExceptionHandlerExtensions.cs
來源:
ExceptionHandlerExtensions.cs

將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況,並在替代管線中重新執行要求。 如果回應已啟動,則不會重新執行要求。

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

參數

傳回

適用於

UseExceptionHandler(IApplicationBuilder, String)

來源:
ExceptionHandlerExtensions.cs
來源:
ExceptionHandlerExtensions.cs
來源:
ExceptionHandlerExtensions.cs

將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況、重設要求路徑,然後重新執行要求。 如果回應已啟動,則不會重新執行要求。

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

參數

errorHandlingPath
String

傳回

適用於

UseExceptionHandler(IApplicationBuilder, String, Boolean)

來源:
ExceptionHandlerExtensions.cs

將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況、重設要求路徑,然後重新執行要求。 如果回應已啟動,則不會重新執行要求。

public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseExceptionHandler (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string errorHandlingPath, bool createScopeForErrors);
static member UseExceptionHandler : Microsoft.AspNetCore.Builder.IApplicationBuilder * string * bool -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseExceptionHandler (app As IApplicationBuilder, errorHandlingPath As String, createScopeForErrors As Boolean) As IApplicationBuilder

參數

errorHandlingPath
String

String 處理例外狀況的端點路徑。

createScopeForErrors
Boolean

是否要建立新的 IServiceProvider 範圍。

傳回

適用於