Created
June 9, 2014 07:02
-
-
Save yatatsu/3e890db52f771e325bcb to your computer and use it in GitHub Desktop.
ios, debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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