Mercurial > p > roundup > code
view roundup/exceptions.py @ 7683:b04e222501b8
fix: rest - set self.start from client.start
Make elasped time include time since client was initialized.
So elapsed is as close as we can get to an overall request service
time.
May need to add rest_elapsed or some other subsystem based timers as
we try to track a possible performance regression in 2.3.0.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 25 Oct 2023 13:12:18 -0400 |
| parents | 273c8c2b5042 |
| children | e882a5d52ae5 |
line wrap: on
line source
"""Exceptions for use across all Roundup components. """ __docformat__ = 'restructuredtext' class RoundupException(Exception): pass class LoginError(RoundupException): pass class RateLimitExceeded(Exception): pass class Unauthorised(RoundupException): pass class RejectBase(RoundupException): pass class Reject(RejectBase): """An auditor may raise this exception when the current create or set operation should be stopped. It is up to the specific interface invoking the create or set to handle this exception sanely. For example: - mailgw will trap and ignore Reject for file attachments and messages - cgi will trap and present the exception in a nice format """ pass class RejectRaw(Reject): """ Performs the same function as Reject, except HTML in the message is not escaped when displayed to the user. """ pass class UsageError(ValueError): pass # vim: set filetype=python ts=4 sw=4 et si
