Commit cda75f49 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

MacOSX/Framework/VLCExceptionHandler.m: Print a nice dialog when we catch an Exception.

parent 3f73dc4a
...@@ -46,8 +46,13 @@ ...@@ -46,8 +46,13 @@
- (BOOL)exceptionHandler:(NSExceptionHandler *)sender shouldLogException:(NSException *)exception mask:(unsigned int)aMask - (BOOL)exceptionHandler:(NSExceptionHandler *)sender shouldLogException:(NSException *)exception mask:(unsigned int)aMask
{ {
[self printStackTrace:exception]; [self printStackTrace:exception];
NSRunCriticalAlertPanel(@"Not handled exception",
[NSString stringWithFormat:@"%@:%@\n\nBack trace has been printed to Console.\nWe will now wait for debugger connection...\n",
[exception name], [exception reason]],
@"Wait Debugger", nil, nil);
return YES; return YES;
} }
- (void)printStackTrace:(NSException *)e - (void)printStackTrace:(NSException *)e
{ {
NSString *stack = [[e userInfo] objectForKey:NSStackTraceKey]; NSString *stack = [[e userInfo] objectForKey:NSStackTraceKey];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment