Core exception handling functions for the MulleObjC runtime.
mulle_objc_throw
- Throws an exception through the runtimemulle_objc_break_exception
- Breakpoint function for catching all exceptions
NSGetUncaughtExceptionHandler
- Gets current uncaught exception handlerNSSetUncaughtExceptionHandler
- Sets uncaught exception handler
// Set custom handler
void MyExceptionHandler(id exception)
{
fprintf(stderr, "Uncaught exception: %s\n",
[exception description]);
abort();
}
NSSetUncaughtExceptionHandler(MyExceptionHandler);
-
Thread Safety
- Exception handling is thread-safe by design
- Handlers are stored per-universe
-
Debugging
- Set breakpoint on mulle_objc_break_exception to catch all exceptions
- Handler is called before program termination