Search code examples
error-handlingcrashsendnbug

Disable Nbug raising exception if it can not send report


Developing WPF application and using Redmine issue tracker to send reports to. If Redmine issue tracker is hosted on server where there is not installed valid SSL certificate, NBug crashes because it can not send reports to server... What if user does not have internet?

I do not want for NBug to crash application because it can not do what it wants to do.

Is there a setting for NBug that if can not send error reports, just allow application gracefully to continue running?


Solution

  • Enable release mode as per documentation:

    NBug.Settings.ReleaseMode = true;
    

    This catches all internal exceptions and logs them instead of throwing them.