Skip to content

Instantly share code, notes, and snippets.

@wess
Created September 25, 2012 18:25
Show Gist options
  • Save wess/3783564 to your computer and use it in GitHub Desktop.
Save wess/3783564 to your computer and use it in GitHub Desktop.
Get a little better stacktrace in Objective-C
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