Пример #1
0
 public ActionResult HandledException()
 {
     ViewBag.Message = "";
     try
     {
         throw new Exception("Demo Exception");
     }
     catch (Exception ex)
     {
         ErrorReporter.ReportErrorHighSeverity(ex, ErrorLogging.GetApplicationContext(User));
         ViewBag.Message = "Exception was handled safely.";
     }
     return(View("Index"));
 }