Created
July 5, 2012 15:17
-
-
Save elm4ward/3054304 to your computer and use it in GitHub Desktop.
main.m with DEBUG Exception Logging
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
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