Skip navigation

Adding test cases for Fera which throw expected exceptions can’t be avoided any longer. The problem is, for every unhandled exception in all normally executed .NET apps, Microsoft will display the familiar Windows error reporting dialog so that you can send information about how MY application is failing, to MICROSOFT, who then places it directly in trash. But naturally these applications are not failing- they are SUPPOSED to throw exceptions which go unhandled.

Unfortunately it is, from what I gather, impossible to disable these dialogs. Microsoft provides an API for adding an application to an exclusion list, though. But this only removes the Send button!! And of course that API is Win32-specific and thus must be used via PInvoke. I implemented this, though it’s not a solution, just to avoid having any stupid reports sent to MS.

There is another solution which works for all non-CLR exceptions, involving setting an exception handler for unhandled exceptions (a mouthful for sure), but this requires added code inside the test unit application (compiled by the Fera compiler), so this is not really a doable solution.

So for now, I must keep my enter key finger ready to dismiss the mess every time I run the test suite.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: