Skip to content

Instantly share code, notes, and snippets.

@yatatsu
Created June 9, 2014 07:02
Show Gist options
  • Save yatatsu/3e890db52f771e325bcb to your computer and use it in GitHub Desktop.
Save yatatsu/3e890db52f771e325bcb to your computer and use it in GitHub Desktop.
ios, debug
#if DEBUG
// http://www.zero4racer.com/blog/480
static void uncaughtExceptionHandler(NSException *exception) {
NSLog(@"CRASH: %@", exception);
NSLog(@"Stack Trace: %@", [exception callStackSymbols]);
// Internal error reporting
}
#endif
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
#if DEBUG
NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler);
#endif
// some code
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment