Changeset 707
- Timestamp:
- 10/03/05 02:23:37
- Files:
-
- trunk/cherrypy/_cperror.py (modified) (2 diffs)
- trunk/cherrypy/_cputil.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cperror.py
r684 r707 30 30 31 31 class Error(Exception): 32 pass33 34 class InternalError(Error):35 """ Error that should never happen """36 32 pass 37 33 … … 216 212 self.args = (path,) 217 213 HTTPError.__init__(self, 404, "The path %s was not found." % repr(path)) 214 215 216 class InternalError(HTTPError): 217 """ Error that should never happen """ 218 219 def __init__(self, message=None): 220 HTTPError.__init__(self, 500, message) trunk/cherrypy/_cputil.py
r694 r707 90 90 return globals()[name] 91 91 except KeyError: 92 raise cherrypy.InternalError("Special attribute %s could not be found"93 % repr(name))92 msg = "Special attribute %s could not be found" % repr(name) 93 raise cherrypy.HTTPError(500, msg) 94 94 95 95 def getSpecialAttributePath(name): … … 102 102 if hasattr(objectList[i], name): 103 103 return "/" + "/".join(pathList[:i] + [name]) 104 raise cherrypy.InternalError("Special attribute %s could not be found"105 % repr(name))104 msg = "Special attribute %s could not be found" % repr(name) 105 raise cherrypy.HTTPError(500, msg) 106 106 107 107

