ExceptionHandlerExtensions.UseExceptionHandler 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
UseExceptionHandler(IApplicationBuilder) |
將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況,並在替代管線中重新執行要求。 如果回應已啟動,則不會重新執行要求。 |
UseExceptionHandler(IApplicationBuilder, ExceptionHandlerOptions) |
將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況,並在替代管線中重新執行要求。 如果回應已啟動,則不會重新執行要求。 |
UseExceptionHandler(IApplicationBuilder, Action<IApplicationBuilder>) |
將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況,並在替代管線中重新執行要求。 如果回應已啟動,則不會重新執行要求。 |
UseExceptionHandler(IApplicationBuilder, String) |
將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況、重設要求路徑,然後重新執行要求。 如果回應已啟動,則不會重新執行要求。 |
UseExceptionHandler(IApplicationBuilder, String, Boolean) |
將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況、重設要求路徑,然後重新執行要求。 如果回應已啟動,則不會重新執行要求。 |
UseExceptionHandler(IApplicationBuilder)
將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況,並在替代管線中重新執行要求。 如果回應已啟動,則不會重新執行要求。
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)
將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況,並在替代管線中重新執行要求。 如果回應已啟動,則不會重新執行要求。
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
參數
- options
- ExceptionHandlerOptions
傳回
適用於
UseExceptionHandler(IApplicationBuilder, Action<IApplicationBuilder>)
將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況,並在替代管線中重新執行要求。 如果回應已啟動,則不會重新執行要求。
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
參數
- configure
- Action<IApplicationBuilder>
傳回
適用於
UseExceptionHandler(IApplicationBuilder, String)
將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況、重設要求路徑,然後重新執行要求。 如果回應已啟動,則不會重新執行要求。
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)
將中介軟體新增至管線,以攔截例外狀況、記錄例外狀況、重設要求路徑,然後重新執行要求。 如果回應已啟動,則不會重新執行要求。
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
參數
- createScopeForErrors
- Boolean
是否要建立新的 IServiceProvider 範圍。