Runtime Exceptions

If an exception is not caught and dealt with, you have an unhandled run-time exception. Figure 4-9 shows what that may look like to the end user on a Pocket PC.

Built-in error dialog box shown for an unhandled run-time exception: the option to quit the application (left); the results after clicking Details (right)

Figure 4-9. Built-in error dialog box shown for an unhandled run-time exception: the option to quit the application (left); the results after clicking Details (right)

In the section titled Exception Handling: Same as the Full .NET Framework earlier in this chapter, a rule was established: Never swallow exceptions. The second rule is: Run-time exceptions are something that the user should never see. In the following sections, we describe how to follow the rule by discussing ...

Get Microsoft® Mobile Development Handbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.