comparison roundup/cgi/exceptions.py @ 4083:bbab97f8ffb2

XMLRPC improvements: * Add support for actions to XMLRPC interface. * Provide bridge so user actions may be executed either via CGI or XMLRPC. * Adjust XMLRPC tests to recent work. * Cleanup.
author Stefan Seefeld <stefan@seefeld.name>
date Fri, 27 Feb 2009 17:46:47 +0000
parents df4a3355ee8f
children 65fef7858606
comparison
equal deleted inserted replaced
4082:5eb5f7e66c37 4083:bbab97f8ffb2
1 #$Id: exceptions.py,v 1.6 2004-11-18 14:10:27 a1s Exp $ 1 """Exceptions for use in Roundup's web interface.
2 '''Exceptions for use in Roundup's web interface. 2 """
3 '''
4 3
5 __docformat__ = 'restructuredtext' 4 __docformat__ = 'restructuredtext'
6 5
6 from roundup.exceptions import LoginError, Unauthorised
7 import cgi 7 import cgi
8 8
9 class HTTPException(Exception): 9 class HTTPException(Exception):
10 pass
11
12 class LoginError(HTTPException):
13 pass
14
15 class Unauthorised(HTTPException):
16 pass 10 pass
17 11
18 class Redirect(HTTPException): 12 class Redirect(HTTPException):
19 pass 13 pass
20 14
48 42
49 The exception value will be displayed in the error page, HTML 43 The exception value will be displayed in the error page, HTML
50 escaped. 44 escaped.
51 """ 45 """
52 def __str__(self): 46 def __str__(self):
53 return ''' 47 return """
54 <html><head><title>Roundup issue tracker: An error has occurred</title> 48 <html><head><title>Roundup issue tracker: An error has occurred</title>
55 <link rel="stylesheet" type="text/css" href="@@file/style.css"> 49 <link rel="stylesheet" type="text/css" href="@@file/style.css">
56 </head> 50 </head>
57 <body class="body" marginwidth="0" marginheight="0"> 51 <body class="body" marginwidth="0" marginheight="0">
58 <p class="error-message">%s</p> 52 <p class="error-message">%s</p>
59 </body></html> 53 </body></html>
60 '''%cgi.escape(self.args[0]) 54 """%cgi.escape(self.args[0])
61 55
62 # vim: set filetype=python sts=4 sw=4 et si : 56 # vim: set filetype=python sts=4 sw=4 et si :

Roundup Issue Tracker: http://roundup-tracker.org/