Mercurial > p > roundup > code
diff roundup/cgi/exceptions.py @ 6123:c177e7128dc9
issue2551083 Replace BaseException and Exception with RoundupException
issue2551083 - Replace BaseException and Exception as base classes
with new RoundupException (inheriting from Exception) for most roundup
exceptions.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Fri, 03 Apr 2020 16:18:59 -0400 |
| parents | 0dc1e0222353 |
| children | 91ab3e0ffcd0 |
line wrap: on
line diff
--- a/roundup/cgi/exceptions.py Tue Mar 03 21:00:38 2020 -0500 +++ b/roundup/cgi/exceptions.py Fri Apr 03 16:18:59 2020 -0400 @@ -7,8 +7,12 @@ from roundup.anypy.html import html_escape +from roundup.exceptions import RoundupException -class HTTPException(BaseException): +class RoundupCGIException(RoundupException): + pass + +class HTTPException(RoundupCGIException): pass @@ -28,7 +32,7 @@ pass -class DetectorError(BaseException): +class DetectorError(RoundupException): """Raised when a detector throws an exception. Contains details of the exception.""" def __init__(self, subject, html, txt): @@ -51,15 +55,15 @@ pass -class SendFile(BaseException): +class SendFile(RoundupException): """Send a file from the database.""" -class SendStaticFile(BaseException): +class SendStaticFile(RoundupException): """Send a static file from the instance html directory.""" -class SeriousError(BaseException): +class SeriousError(RoundupException): """Raised when we can't reasonably display an error message on a templated page.
