title: Draw on screen with CoreGraphics when hit NSSetUncaughtExceptionHandler
body: <p>I'm trying to draw something simple on screen when <code>NSSetUncaughtExceptionHandler</code> gets called but nothings happen.
  Is there any other way to catch an exception and quickly draw something on screen?</p>
  
  <pre><code>NSSetUncaughtExceptionHandler(&amp;exceptionHandler);
  
  void exceptionHandler(NSException *exception)
  {
      UIBezierPath *path = [UIBezierPath bezierPath];
      [path moveToPoint:CGPointMake(10.0, 10.0)];
      [path moveToPoint:CGPointMake(10.0, 10.0)];
      [path addLineToPoint:CGPointMake(10.0, 450.0)];
      [path addLineToPoint:CGPointMake(310.0, 450.0)];
      [path addLineToPoint:CGPointMake(310.0, 10.0)];
      [path addLineToPoint:CGPointMake(10.0, 10.0)];
  
      CAShapeLayer *shapeLayer = [CAShapeLayer layer];
      shapeLayer.path = [path CGPath];
      shapeLayer.strokeColor = [[UIColor blueColor] CGColor];
      shapeLayer.lineWidth = 3.0;
      shapeLayer.fillColor = [[UIColor clearColor] CGColor];
  
      [APP_DELEGATE_WINDOW.rootViewController.view.layer addSublayer:shapeLayer];
      [APP_DELEGATE_WINDOW makeKeyAndVisible];
  }
  </code></pre>