How to catch an Exception like this on Flask?
问题 I run a simple flask app like this: from flask import Flask app = Flask(__name__) @app.route('/') def welcome(): return "OK" app.config.update( DEBUG = True ) if __name__ == '__main__': app.run(use_reloader = False) when I run it and visit it, sometimes(not always) it could't response the request and throw an except: Exception happened during processing of request from ('127.0.0.1', 54481) Traceback (most recent call last): File "c:\python27\Lib\SocketServer.py", line 295, in _handle_request