I have set Elmah for an ASP.NET MVC 5 project to handle exceptions and save them in database (Oracle).
Now I've encountered a situation where Elmah can fail to log exceptions in database and cause an exception by itself because database being down, connection string changes etc.
I tried this:
try { Elmah.ErrorSignal.FromCurrentContext().Raise(new Exception("Testing Elmah exception handling")); } catch (Exception ex) { LogException(ex); } but LogException(ex) is never executed.
In LogException I have implemented a custom logger that also writes in database.