title: NSSetUncaughtExceptionHandler not catch all errors on iPhone
body: <p>I'm using GTMStackTrace from <a href="http://code.google.com/p/google-toolbox-for-mac" rel="noreferrer">http://code.google.com/p/google-toolbox-for-mac</a>.</p>
  
  <p>I need a way to test end-user to send me errors when the  app crash. I know how send data to my website but the problem is how catch all non-handled errors.</p>
  
  <p>I have this code:</p>
  
  <pre><code>void exceptionHandler(NSException *exception) {
      NSLog(@"%@", [exception reason]);
      NSLog(@"%@", [exception userInfo]);
      NSLog(@"%@", GTMStackTraceFromException(exception));
  
      UIAlertView *alert = [[UIAlertView alloc]
                            initWithTitle:NSLocalizedString(@"Error unexpected",@"Info: Can't save record")
                            message:GTMStackTraceFromException(exception) delegate:nil 
                            cancelButtonTitle:NSLocalizedString(@"Ok",@"Button: Ok") otherButtonTitles:nil];
      [alert show];
      [alert release];    
  }
  
  int main(int argc, char *argv[]) {
      //For crash report..
      NSSetUncaughtExceptionHandler(&amp;exceptionHandler);
      //Normal code...
      NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
      int retVal = UIApplicationMain(argc, argv, nil, nil);
      [pool release];
      return retVal;
  }
  </code></pre>
  
  <p>However, the thing not caught a lot of errors, like a bad release, a BAD ACCES, etc, and the App disappear. I have 2 issues where is not clear why happend and the end-users have not clue about what to say.</p>
  
  <p>(For example release twice the same var is not catch)</p>
  
  <p>So, how I get ALL that pesky errors so the end-user simple send me a crash report?</p>