Catching Exceptions

JSwat supports catching exceptions as if they were breakpoints. This includes exceptions that are caught in the Java code running in the debuggee VM and exceptions that are not caught.

The catch command can be used to create an exception catch. There is also a like-named item in the "Breakpoints" menu. Catching an exception requires the name of the exception to be caught. This must either be a fully-qualified class name or a wild-carded class name (i.e. has a '*' either at the beginning or end of the name).

Exception breakpoints can have both class and thread filters. See the breakpoints help for the section on setting up filters. The class filters apply to the class that is throwing the exception.

A single exception may be thrown multiple times. JSwat does not distinguish this case and so it may appear that more than one exception is being caught when in fact it is one exception that has been re-thrown.

JSwat always creates an invisible exception breakpoint for all uncaught exceptions. This breakpoint cannot be removed or modified as it is not visible to the user.