defnull/bottle — Issue #240: Bottle server crashes on reload when code has syntax error
Author: coredumperror
Created: 2011-10-18 20:17:48+00:00
State: open

In my attempts to get around this myself, I've discovered that this may simply be impossible, but it would be really nice if the bottle server (`run(reloader=True)`) wouldn't crash out when it reloads a file with a syntax error.

I realize that this may be impossible to fix since it's the interpreter itself throwing the exception, but if the server could somehow catch this and keep itself alive until the next reload it would be much more convenient. The main reason I use the dev server instead of Apache is that I don't want to restart the server for every code change I make. But I find that the bottle server has to be restarted almost as often as Apache because of syntax error exceptions that crash the app.

Maybe there's a way to code my wsgi script to handle this myself, but I haven't found a working method.