|
|
- using System.Web.Mvc;
-
- namespace Sevomin.WebFrontend.Controllers
- {
- public class BaseController : Controller
- {
- protected override void OnException(ExceptionContext filterContext)
- {
- filterContext.ExceptionHandled = true;
- 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();
- }
-
- }
- }
|