Skip to content

Instantly share code, notes, and snippets.

@elm4ward
Created July 5, 2012 15:17
Show Gist options
  • Save elm4ward/3054304 to your computer and use it in GitHub Desktop.
Save elm4ward/3054304 to your computer and use it in GitHub Desktop.
main.m with DEBUG Exception Logging
int main(int argc, char *argv[])
{
#ifdef DEBUG
// will make debugging more easy
@try {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
@catch (NSException *exception) {
NSLog(@"exception %@", exception);
}
#else
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment