Skip to content

Instantly share code, notes, and snippets.

@sandinist
Created February 25, 2012 16:37
Show Gist options
  • Save sandinist/1909445 to your computer and use it in GitHub Desktop.
Save sandinist/1909445 to your computer and use it in GitHub Desktop.
NSSetUncaughtExceptionHandler
#import "AppDelegate.h"
void uncaughtExceptionHandler(NSException *exception) {
NSLog(@"CRASH: %@", exception);
NSLog(@"Stack Trace: %@", [exception callStackSymbols]);
// Internal error reporting
}
@implementation AppDelegate
@synthesize window = _window;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler);
// Override point for customization after application launch.
return YES;
}
@sandinist
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment