Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

Dialog Box for Errors


#1

Hello,

Is there a way with SmartInspect to have SmartInspect field an exception and in addition to logging the exception, also showing a dialog box? We are coding with C#. This way we don’t need to add multiple lines to our Exception catches in code.

Thanks,

Kent


#2

Hello Kent,

Thanks for your posting. You would need to implement this independently of SmartInspect and SmartInspect would only log exceptions (and does not display them as part of a dialog box, for example). The easiest way to implement this is to register a custom event handler for the global exception/error event (or as part of a catch block) and then:

  1. Show the dialog box
  2. Add the exception to the SmartInspect log using LogException

I hope this helps!

Regards,
Tobias