Created
February 25, 2012 16:37
-
-
Save sandinist/1909445 to your computer and use it in GitHub Desktop.
NSSetUncaughtExceptionHandler
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
#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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.zero4racer.com/blog/480 より