Changeset 2428


Ignore:
Timestamp:
Aug 10, 2009, 11:40:27 PM (15 years ago)
Author:
quentin
Message:

Update the errortest handler for cherrypy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy/code/main.py

    r2424 r2428  
    182182        return {'request': cherrypy.request, 'kwargs': kwargs}
    183183    helloworld._cp_config['tools.require_login.on'] = False
     184
     185    @cherrypy.expose
     186    def errortest(self):
     187        """Throw an error, to test the error-tracing mechanisms."""
     188        raise RuntimeError("test of the emergency broadcast system")
    184189
    185190    class MachineView(View):
     
    653658    return handler(username, newstate, path, fields)
    654659
    655 def throwError(_, __, ___, ____):
    656     """Throw an error, to test the error-tracing mechanisms."""
    657     raise RuntimeError("test of the emergency broadcast system")
    658 
    659660mapping = dict(
    660661               modify=modify,
    661662               unauth=unauthFront,
    662663               admin=admin,
    663                overlord=admin,
    664                errortest=throwError)
     664               overlord=admin)
    665665
    666666def printHeaders(headers):
Note: See TracChangeset for help on using the changeset viewer.