Skip to content

Instantly share code, notes, and snippets.

@brentd
Created April 22, 2010 19:08
Show Gist options
  • Save brentd/375667 to your computer and use it in GitHub Desktop.
Save brentd/375667 to your computer and use it in GitHub Desktop.
// In an NSOperation subclass...
- (void)main {
@try
{
// Do some stuff that could be buggy...
}
@catch(NSException* ex)
{
// For debugging purposes, re-raise in the main thread any exceptions that are thrown in this thread.
[ex performSelectorOnMainThread:@selector(raise) withObject:nil waitUntilDone:YES];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment