Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 924

Show
Ignore:
Timestamp:
01/12/06 06:45:24
Author:
rdelon
Message:

Better formatting of tracebacks: the page handler is now included at the top. That way the error it still a string and not a tuple so an error message can be on multiple lines and it gets displayed fine in the browser

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cputil.py

    r920 r924  
    324324    if exc == (None, None, None): 
    325325        return "" 
    326     return "".join(traceback.format_exception(*exc)) 
     326    args = exc[1].args 
     327    page_handler = args[-1] 
     328    page_handler_str = 'Page handler: %s\n' % repr(page_handler) 
     329    args = args[:-1] 
     330    exc[1].args = args 
     331    return page_handler_str + "".join(traceback.format_exception(*exc)) 
    327332 
    328333def bareError(extrabody=None): 

Hosted by WebFaction

Log in as guest/cpguest to create tickets