Mercurial > p > roundup > code
comparison roundup/cgi/exceptions.py @ 2052:78e6a1e4984e
forward-port from maint branch
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 25 Feb 2004 23:27:54 +0000 |
| parents | 1782fe36e7b8 |
| children | f6d7ccce8d96 |
comparison
equal
deleted
inserted
replaced
| 2049:5a5f66e6b0e1 | 2052:78e6a1e4984e |
|---|---|
| 28 class SendFile(Exception): | 28 class SendFile(Exception): |
| 29 """Send a file from the database.""" | 29 """Send a file from the database.""" |
| 30 | 30 |
| 31 class SendStaticFile(Exception): | 31 class SendStaticFile(Exception): |
| 32 """Send a static file from the instance html directory.""" | 32 """Send a static file from the instance html directory.""" |
| 33 | |
| 34 class SeriousError(Exception): | |
| 35 """Raised when we can't reasonably display an error message on a | |
| 36 templated page. | |
| 37 | |
| 38 The exception value will be displayed in the error page, HTML | |
| 39 escaped. | |
| 40 """ | |
| 41 def __str__(self): | |
| 42 return ''' | |
| 43 <html><head><title>Roundup issue tracker: An error has occurred</title> | |
| 44 <meta http-equiv="Content-Type" content="text/html; charset=utf-8;"> | |
| 45 <link rel="stylesheet" type="text/css" href="_file/style.css"> | |
| 46 </head> | |
| 47 <body class="body" marginwidth="0" marginheight="0"> | |
| 48 <p class="error-message">%s</p> | |
| 49 </body></html> | |
| 50 '''%cgi.escape(self.args[0]) | |
| 51 |
