Created
September 25, 2012 18:25
-
-
Save wess/3783564 to your computer and use it in GitHub Desktop.
Get a little better stacktrace in Objective-C
This file contains hidden or 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
int main(int argc, char *argv[]) | |
{ | |
@autoreleasepool | |
{ | |
int retVal; | |
@try | |
{ | |
retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([YOUR_DELEGATE class])); | |
} | |
@catch (NSException *exception) | |
{ | |
NSLog(@"CRASH: %@", [exception callStackSymbols]); | |
@throw; | |
} | |
return retVal; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment