You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 lines
720 B

using System.Web.Mvc;
namespace Sevomin.WebFrontend.Controllers
{
public class BaseController : Controller
{
protected override void OnException(ExceptionContext filterContext)
{
#if DEBUG
filterContext.ExceptionHandled = false;
#else
filterContext.ExceptionHandled = true;
#endif
var e = new Elmah.Error(filterContext.Exception);
Elmah.ErrorLog.GetDefault(System.Web.HttpContext.Current).Log(e);
// Redirect
filterContext.Result = View("Error");
base.OnException(filterContext);
}
public ActionResult Error404()
{
return View();
}
}
}