title: problem in Error handling method in iPhone sdk
body: <p>I am using Error Handling Method globally in appDelegate method to caught exceptions.</p>
  
  <p>Code:</p>
  
  <p>//In appDelegate.m</p>
  
  <pre><code> static void uncaughtExceptionHandler(NSException *exception) 
    {
     printf("\n ===== In uncaughtExceptionHandler Method =======");
  
    NSArray *stack = [exception callStackReturnAddresses];
    NSLog(@"========  Exception *************%@", stack);
      UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:@"Exception Occured"
                                                             delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
          [alert show];   
          [alert release];
  
    }
  
  -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary 
   *)launchOptions 
    {    
  
   // Override point for customization after application launch.
   NSSetUncaughtExceptionHandler(&amp;uncaughtExceptionHandler);
  
  
   }
  </code></pre>
  
  <p>I am implementing an Alert in the uncaughtExceptionHandler Method. But I am getting Error as
    "self " undeclared.</p>
  
  <p>Can Anyone Please Suggest how to implement Alert when the uncaughtExceptionHandler is
     called.</p>
  
  <p>thanks in Advance.</p>