[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


5.2.8 Determining the Current Exception

The current exception object can be referenced within a CATCH or CATCH_ALL block by using the name THIS_CATCH. The exception object THIS_CATCH has a type of EXCEPTION *. This value can be passed to pthread_exc_get_status_np(), pthread_exc_report_np(), or pthread_exc_ matches_np() (defined in Section 5.2.10, Section 5.2.11, and Section 5.2.12).

Because of the way exceptions are propagated, the address contained in THIS_CATCH might not be the actual address of an address exception; if you need to match THIS_CATCH against known exceptions, use pthread_exc_matches_np().