Stopping When Ada Exceptions Are Raised (GNAT User’s Guide for Native Platforms)

#### 6.1.7 Stopping When Ada Exceptions Are Raised ¶

You can set catchpoints that stop the program execution when your program raises selected exceptions.

- `catch exception`

    Set a catchpoint that stops execution whenever (any task in the) program raises any exception.

- `catch exception name`

    Set a catchpoint that stops execution whenever (any task in the) program raises the exception ‘name’.

- `catch exception unhandled`

    Set a catchpoint that stops executing whenever (any task in the) program raises an exception for which there is no handler.

- `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’.