tests/hgweberror.py
changeset 36871 3d60a22e27f5
parent 27299 74e6de99ce7f
child 36882 97f44b0720e2
equal deleted inserted replaced
36870:4e06e8336634 36871:3d60a22e27f5
     8 
     8 
     9 def raiseerror(web, req, tmpl):
     9 def raiseerror(web, req, tmpl):
    10     '''Dummy web command that raises an uncaught Exception.'''
    10     '''Dummy web command that raises an uncaught Exception.'''
    11 
    11 
    12     # Simulate an error after partial response.
    12     # Simulate an error after partial response.
    13     if 'partialresponse' in req.form:
    13     if 'partialresponse' in req.req.qsparams:
    14         req.respond(200, 'text/plain')
    14         req.respond(200, 'text/plain')
    15         req.write('partial content\n')
    15         req.write('partial content\n')
    16 
    16 
    17     raise AttributeError('I am an uncaught error!')
    17     raise AttributeError('I am an uncaught error!')
    18 
    18