Skip to content

Instantly share code, notes, and snippets.

@bakkiraju
Created November 15, 2017 05:19
Show Gist options
  • Save bakkiraju/bf3d0bf77c3e1fc01b515c79c7b2df67 to your computer and use it in GitHub Desktop.
Save bakkiraju/bf3d0bf77c3e1fc01b515c79c7b2df67 to your computer and use it in GitHub Desktop.
[objC] Setting up universal exception handler in NSApplication
void BAUncaughtExceptionHandler (NSException* exception);
int main (int argc, const char* argv[])
{
BASetUncaughtExceptionHandler (&AZUncaughtExceptionHandler);
}
void BAUncaughtExceptionHandler (
NSException* exception)
{
[[NSApplication sharedApplication] reportException:exception];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment