Share via


Configure Exception Handling (Compact 7)

3/12/2014

An exception is an abnormal situation that happens while a program is running. Exceptions are often indications of problems that you need to debug. The kernel debugger recognizes many types of exceptions. These include Windows Embedded Compact exceptions, C++ exceptions, common language run-time exceptions, Win32 exceptions, and native run-time checks.

Some types of exceptions, such as C++ exceptions, have handlers. Handlers are pieces of code that respond to an exception when it occurs, giving the program a chance to recover from the abnormal situation. C run-time errors do not have handlers.

Note

The debugger does not handle exceptions in managed code.

By using the Exceptions Dialog Box, you can view the list of exceptions and choose if you want the debugger to stop at the exception or if you want the debugger to allow the exception handler to execute.

To view or change how the debugger handles a type of exception

  1. Start debugging.

  2. On the Platform Builder Debug menu, click Exceptions. (This command is available only when you are debugging.) The Exceptions dialog box appears and displays the exception number, description, and action for each exception.

  3. In the Exceptions dialog box, in the Exceptions list, select the exception whose handling you want to change. You can select more than one exception at a time by holding down the Shift or Ctrl key.

  4. If you want execution to break as soon as the exception occurs, and not allow the exception handler to execute, click Stop always. If you want the handler to attempt to fix the issue that caused the exception, click Stop if not handled.

  5. Click Change.

  6. Click OK to close the Exceptions dialog box.

See Also

Concepts

Set Debug Options
Kernel Debugger
Debugging

Other Resources

Windows Embedded Compact 7