Setting a Breakpoint on an Exception

In the menu bar:

  1. Choose Debug > Create Breakpoint...

  2. Choose Exception Breakpoint from the option menu in the Breakpoint dialog.

  3. Enter the name of the class provided as an argument to the throw statement in your source code.

  4. Click OK.

In the Command card:

  1. Identify the exception object on which you want to set an exception. You can type exceptions in the command-line interface to get a list of handled exceptions.

  2. Type stop exception exception_object to set a breakpoint which stops execution when exception_object is thrown.

Note: If your code includes an exception that is not handled, your program exits when the exception is thrown, and the message "Uncaught exception thrown" appears in the status line with details on the exception that was thrown and the class name and location where the exception was thrown.

See Also

Guide to the Cosmo Code Development Environment
12-96*242