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
{
}
}
}