~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/apps/__init__.py

  • Committer: drtomc
  • Date: 2008-02-25 02:23:18 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:561
app: improve the error message when an app fails to load.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    try:
29
29
        # level=-1 to make it look in the right directory
30
30
        app_module = __import__(appname, globals(), locals(), [], -1)
31
 
        app_module.handle(req)
32
 
    except ImportError:
 
31
    except ImportError, msg:
33
32
        # Any problems meant it's a server error, because conf/apps.py said
34
33
        # this app would be here.
35
34
        req.throw_error(req.HTTP_INTERNAL_SERVER_ERROR,
36
 
            "Could not load the %s application." % repr(appname))
 
35
            "Could not load the %s application: %s" % (repr(appname), str(msg)))
 
36
    app_module.handle(req)