Next: , Previous: Stopping at Main Program, Up: Ada



12.4.3.5 Breaking on Ada Exceptions

In Ada mode, you can set breakpoints that trip when your program raises selected exceptions.

break exception
Set a breakpoint that trips whenever (any task in the) program raises any exception.
break exception name
Set a breakpoint that trips whenever (any task in the) program raises the exception name.
break exception unhandled
Set a breakpoint that trips whenever (any task in the) program raises an exception for which there is no handler. At the moment, depending on the implementation of exceptions used on your platform, this may not have quite the desired effect. Other forms of exception breaking stop the program at the point the exception is raised. On Ada implementations that use setjmp and longjmp to implement exception handling, however, unhandled exceptions are not detected until the affected task's stack is completely unwound. Thus, you find out that a task has terminated with an exception, but you aren't told where it was raised.


info exceptions
info exceptions regexp
The info exceptions command permits the user to examine all defined exceptions within Ada programs. With a regular expression, regexp, as argument, prints out only those exceptions whose name matches regexp.