0

HandleError属性/アクション フィルターが処理するエラーの種類について、まだ混乱しています。

たとえば、以下のコードでは、HandleErrorフィルターが MVC 4 アプリケーションのグローバル アクション フィルターとして定義されているとします。

以下の try catch ブロックでキャッチした例外は、アクション フィルターのOnErrorハンドラーにも到達しますか?HandleError

public class SomeController : Controller
{
    public ActionResult SomeAction()
    {
        new SomeBusinessLogicComponentInTheMVCProject().DoSomething();
        return View();
    }
}

public class SomeBusinessLogicComponentInTheMVCProject
{
    public void DoSomething()
    {
        try
        {
        }
        catch (Exception ex)
        {
            // Will the HandleError filter's OnError 
            // handler catch this exception?
        }
        finally
        {
        }
    }
}
4

1 に答える 1