I trying to check if an exception has been raised by an action with the filterContext.Exception below:
public class Test : ActionFilterAttribute
[...]
public override void OnActionExecuted(ActionExecutedContext filterContext)
{
if (filterContext.Exception != null)
{
continue;
}
}
in controller:
[Test]
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Login(Usuarios usuario)
{
try
{
throw new Exception();
}
catch
{
}
}
The filterContext.Exception is always null.I can't catch this information here.
Any ideias?