2

I'm manually logging certain errors like this:

ApplicationException ex = new ApplicationException("Testing");

Elmah.ErrorLog.GetDefault(System.Web.HttpContext.Current).Log(new Elmah.Error(ex));

The unhandled exceptions are sending email, but the manually logged ones are not. I've also tried this:

Elmah.ErrorSignal.FromCurrentContext().Raise(ex);

How do I get these manually logged errors to send email (without throwing and showing a custom error page)?

nmit026
  • 3,024
  • 2
  • 27
  • 53

1 Answers1

3

I spoke too soon.

This doesn't send email:

Elmah.ErrorLog.GetDefault(System.Web.HttpContext.Current).Log(new Elmah.Error(ex));

But this does:

Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
nmit026
  • 3,024
  • 2
  • 27
  • 53