Ensure delegate is retained

This commit is contained in:
Allan Odgaard
2013-09-05 21:53:14 +02:00
parent 1c308c810d
commit f346f2e717

View File

@@ -110,8 +110,9 @@ void OakPrintBadAssertion (char const* lhs, char const* op, char const* rhs, std
+ (void)enableAllExceptions:(NSNotification*)aNotification
{
static OakExceptionHandlerDelegate* exceptionDelegate = [self new];
[[NSExceptionHandler defaultExceptionHandler] setExceptionHandlingMask:NSLogAndHandleEveryExceptionMask];
[[NSExceptionHandler defaultExceptionHandler] setDelegate:[self new]];
[[NSExceptionHandler defaultExceptionHandler] setDelegate:exceptionDelegate];
}
- (BOOL)exceptionHandler:(NSExceptionHandler*)sender shouldLogException:(NSException*)exception mask:(NSUInteger)mask