Created
October 23, 2009 07:01
-
-
Save neror/216705 to your computer and use it in GitHub Desktop.
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
#import <UIKit/UIKit.h> | |
#import "GTMStackTrace.h" | |
#ifdef DEBUG | |
extern BOOL NSDebugEnabled; | |
extern BOOL NSZombieEnabled; | |
extern BOOL NSDeallocateZombies; | |
extern BOOL NSHangOnUncaughtException; | |
static void exceptionHandler(NSException *exception) { | |
FTLOG(@"%@", GTMStackTraceFromException(exception)); | |
} | |
#endif | |
int main(int argc, char *argv[]) { | |
#ifdef DEBUG | |
NSLog(@"Debug enabled"); | |
NSDebugEnabled = YES; | |
NSZombieEnabled = YES; | |
NSDeallocateZombies = NO; | |
NSHangOnUncaughtException = YES; | |
NSSetUncaughtExceptionHandler(&exceptionHandler); | |
#endif | |
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; | |
int retVal = UIApplicationMain(argc, argv, nil, nil); | |
[pool release]; | |
return retVal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment