I love Flask\'s error catching. It\'s beautifully simple:
@app.errorhandler(404) def pageNotFound(error): return \"page not found\"
works
here is my code snippt
@app.route('/') def index(): raise Exception("Can't connect to database") @app.errorhandler(Exception) def exception_handler(error): return "!!!!" + repr(error)