Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 2.78 KB

MulleObjCExceptionHandler.md

File metadata and controls

37 lines (26 loc) · 2.78 KB

MulleObjCExceptionHandler

Core exception handling functions for the MulleObjC runtime.

Exception Functions

Handler Management

Usage Example

// Set custom handler
void MyExceptionHandler(id exception)
{
   fprintf(stderr, "Uncaught exception: %s\n", 
           [exception description]);
   abort();
}

NSSetUncaughtExceptionHandler(MyExceptionHandler);

Important Notes

  1. Thread Safety

    • Exception handling is thread-safe by design
    • Handlers are stored per-universe
  2. Debugging

    • Set breakpoint on mulle_objc_break_exception to catch all exceptions
    • Handler is called before program termination