public void OnErrorRequest(object sender, EventArgs e) { if (HttpContext.Current != null) { notifier = Activator.CreateInstance(notifierType) as InfoControl.Web.Auditing.ExceptionManager; try { var ex = HttpContext.Current.Error; if ((ex.Message ?? "").Contains("HttpUnhandledException")) { ex = ex.InnerException; } HttpContext.Current.Trace.Warn("Exception Module Begin"); notifier.Notify(ex); } catch (Exception ex) { // // Retry to notify // notifier.Notify(ex); } finally { // // Guarda no cache o erro para ser mostrado amigavelmente no Custom Error pages // //if (HttpContext.Current.Session != null) // HttpContext.Current.Session["Error"] = exception; HttpContext.Current.Trace.Warn("Exception Module End"); } } }
public void OnErrorRequest(object sender, EventArgs e) { if (HttpContext.Current != null) { notifier = Activator.CreateInstance(notifierType) as InfoControl.Web.Auditing.ExceptionManager; try { var ex = HttpContext.Current.Error; if ((ex.Message ?? "").Contains("HttpUnhandledException")) ex = ex.InnerException; HttpContext.Current.Trace.Warn("Exception Module Begin"); notifier.Notify(ex); } catch (Exception ex) { // // Retry to notify // notifier.Notify(ex); } finally { // // Guarda no cache o erro para ser mostrado amigavelmente no Custom Error pages // //if (HttpContext.Current.Session != null) // HttpContext.Current.Session["Error"] = exception; HttpContext.Current.Trace.Warn("Exception Module End"); } } }