diff roundup/cgi/exceptions.py @ 2004:1782fe36e7b8

Move out parts of client.py to new modules: * actions.py - the xxxAction and xxxPermission functions refactored into Action classes * exceptions.py - all exceptions * form_parser.py - parsePropsFromForm & extractFormList in a FormParser class Also added some new tests for the Actions.
author Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
date Wed, 11 Feb 2004 21:34:31 +0000
parents
children 78e6a1e4984e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/roundup/cgi/exceptions.py	Wed Feb 11 21:34:31 2004 +0000
@@ -0,0 +1,32 @@
+class HTTPException(Exception):
+    pass
+
+class Unauthorised(HTTPException):
+    pass
+
+class Redirect(HTTPException):
+    pass
+
+class NotFound(HTTPException):
+    pass
+
+class NotModified(HTTPException):
+    pass
+
+class FormError(ValueError):
+    """An 'expected' exception occurred during form parsing.
+
+    That is, something we know can go wrong, and don't want to alarm the user
+    with.
+
+    We trap this at the user interface level and feed back a nice error to the
+    user.
+
+    """
+    pass
+
+class SendFile(Exception):
+    """Send a file from the database."""
+
+class SendStaticFile(Exception):
+    """Send a static file from the instance html directory."""

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