]> git.sesse.net Git - vlc/blobdiff - projects/macosx/vlc_app/Sources/VLCExceptionHandler.m
vlc_app: New media layer view. Enabled by default. Set bindings from resources. ...
[vlc] / projects / macosx / vlc_app / Sources / VLCExceptionHandler.m
index 0dcd50e6a1bad9f3c8c751a3fb6344d0e3e19210..03aff6146429de95e97232cf8ed0d8481b95188d 100644 (file)
 - (BOOL)exceptionHandler:(NSExceptionHandler *)sender shouldLogException:(NSException *)exception mask:(unsigned int)aMask
 {
     [self printStackTrace:exception];
-    NSRunCriticalAlertPanel(@"Exception not handled!",
+    NSLog(@"*** Exception Handled! %@: %@", [exception name], [exception reason]);
+    int ret = NSRunCriticalAlertPanel(@"Exception not handled!",
                             [NSString stringWithFormat:@"%@: %@\n\nBack trace has been printed to Console.\n\nWe will now wait for debugger connection...\n",
                                 [exception name], [exception reason]],
-                            @"Wait Debugger", nil, nil);
-    NSLog(@"*** Exception Handled! %@: %@", [exception name], [exception reason]);
+                            @"Quit", @"Wait Debugger", nil);
+    if( ret == NSOKButton )
+    {
+        [NSApp terminate:self];
+    }
     return YES;
 }