[hg] galaxy 1730: Handle exceptions when building the app (witho...
details: http://www.bx.psu.edu/hg/galaxy/rev/0424f713d58d changeset: 1730:0424f713d58d user: Nate Coraor <nate@bx.psu.edu> date: Tue Feb 03 14:14:02 2009 -0500 description: Handle exceptions when building the app (without a try block, you have to manually kill the process if there's an exception during startup) 1 file(s) affected in this change: lib/galaxy/web/buildapp.py diffs (19 lines): diff -r 743237dd0e65 -r 0424f713d58d lib/galaxy/web/buildapp.py --- a/lib/galaxy/web/buildapp.py Mon Feb 02 18:57:07 2009 -0500 +++ b/lib/galaxy/web/buildapp.py Tue Feb 03 14:14:02 2009 -0500 @@ -51,8 +51,13 @@ if 'app' in kwargs: app = kwargs.pop( 'app' ) else: - from galaxy.app import UniverseApplication - app = UniverseApplication( global_conf = global_conf, **kwargs ) + try: + from galaxy.app import UniverseApplication + app = UniverseApplication( global_conf = global_conf, **kwargs ) + except: + import traceback, sys + traceback.print_exc() + sys.exit( 1 ) atexit.register( app.shutdown ) # Create the universe WSGI application webapp = galaxy.web.framework.WebApplication( app, session_cookie='galaxysession' )
participants (1)
-
Greg Von Kuster