O'Reilly logo

Applied Microsoft® .NET Framework Programming by Jeffrey Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Unhandled Exceptions

As explained in the previous section, when an exception is thrown, the CLR starts searching for a catch filter interested in handling the exception. If no catch filter accepts the exception object, an unhandled exception occurs. An unhandled exception identifies a situation that the application didn’t anticipate.

When developing an application, you should set a policy for dealing with unhandled exceptions. In addition, it’s quite common to have one policy for debug versions of your application and a different policy for release versions. Normally, in a debug version, you want the debugger to start and attach itself to your application so that you can find out exactly what went wrong and correct the code.

For a release version, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required