title: Global error handler for any exception
body: <p>Is there a way to add a global catch-all error handler in which I can change the response to a generic JSON response?</p>
  
  <p>I can't use the <code>got_request_exception</code> signal, as it is not allowed to modify the response (<a href="http://flask.pocoo.org/docs/0.10/signals/" rel="noreferrer">http://flask.pocoo.org/docs/0.10/signals/</a>).</p>
  
  <blockquote>
    <p>In contrast all signal handlers are executed in undefined order and do not modify any data.</p>
  </blockquote>
  
  <p>I would prefer to not wrap the <code>app.handle_exception</code> function as that feels like internal API. I guess I'm after something like:</p>
  
  <pre><code> @app.errorhandler()
   def handle_global_error(e):
       return "Global error"
  </code></pre>
  
  <p>Note the <code>errorhandler</code> does not take any parameters, meaning it would catch all exceptions/status codes which does not have a specific error handler attached to them. I know I can use <code>errorhandler(500)</code> or <code>errorhandler(Exception)</code> to catch exceptions, but if I do <code>abort(409)</code> for example, it will still return a HTML response.</p>