Code

Move 'UsageError' definition from roundup.admin to roundup.exceptions.
[roundup.git] / roundup / exceptions.py
1 #$Id: exceptions.py,v 1.1 2004-03-26 00:44:11 richard Exp $
2 '''Exceptions for use across all Roundup components.
3 '''
5 __docformat__ = 'restructuredtext'
7 class Reject(Exception):
8     '''An auditor may raise this exception when the current create or set
9     operation should be stopped.
11     It is up to the specific interface invoking the create or set to
12     handle this exception sanely. For example:
14     - mailgw will trap and ignore Reject for file attachments and messages
15     - cgi will trap and present the exception in a nice format
16     '''
17     pass
19 class UsageError(ValueError):
20     pass
22 # vim: set filetype=python ts=4 sw=4 et si