To use the exception-returning interface, replace the first statement that follows with the second:
#include <pthread.h> #include <pthread_exc.h>