annotate roundup/exceptions.py @ 6628:2bb6d7baa47d

"Comment" out the meta data - will not process under 1.7.5 sphinx Apparently field names with : fail on 1.7.5 sphinx which is the virtual env version on sourceforge. It works on my 1.6.7 python2 install. Looks like I need to add sphinxext-opengraph to get this to work. However that is python3 only so need to spin up new virtualenv etc. Looks like no python3 on sourceforge which may be an issue. On sourceforge in /home/project-web/roundup/src/docbuilder these packages are used and must be scp'ed as pip has no network access outside of sourceforge: Babel-2.6.0-py2.py3-none-any.whl Jinja2-2.10-py2.py3-none-any.whl MarkupSafe-1.0.tar.gz Pygments-2.2.0-py2.py3-none-any.whl Sphinx-1.7.5 Sphinx-1.7.5-py2.py3-none-any.whl Sphinx-1.7.5.tar.gz alabaster-0.7.11-py2.py3-none-any.whl certifi-2018.4.16-py2.py3-none-any.whl chardet-3.0.4-py2.py3-none-any.whl docutils-0.14-py2-none-any.whl idna-2.7-py2.py3-none-any.whl imagesize-1.0.0-py2.py3-none-any.whl packaging-17.1-py2.py3-none-any.whl pip-10.0.1 pip-10.0.1.tar.gz pyparsing-2.2.0-py2.py3-none-any.whl pytz-2018.5-py2.py3-none-any.whl requests-2.19.1-py2.py3-none-any.whl setuptools-39.2.0-py2.py3-none-any.whl six-1.11.0-py2.py3-none-any.whl snowballstemmer-1.2.1-py2.py3-none-any.whl sphinxcontrib_websupport-1.1.0-py2.py3-none-any.whl typing-3.6.4-py2-none-any.whl urllib3-1.23-py2.py3-none-any.whl
author John Rouillard <rouilj@ieee.org>
date Sun, 27 Mar 2022 13:57:04 -0400
parents c177e7128dc9
children e16b7d47fdb2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4083
bbab97f8ffb2 XMLRPC improvements:
Stefan Seefeld <stefan@seefeld.name>
parents: 4066
diff changeset
1 """Exceptions for use across all Roundup components.
bbab97f8ffb2 XMLRPC improvements:
Stefan Seefeld <stefan@seefeld.name>
parents: 4066
diff changeset
2 """
2129
3fd672293712 add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
3
3fd672293712 add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
4 __docformat__ = 'restructuredtext'
3fd672293712 add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
5
6005
292c9dfd06bd flake8 formatting fixes.
John Rouillard <rouilj@ieee.org>
parents: 5264
diff changeset
6
6123
c177e7128dc9 issue2551083 Replace BaseException and Exception with RoundupException
John Rouillard <rouilj@ieee.org>
parents: 6005
diff changeset
7 class RoundupException(Exception):
c177e7128dc9 issue2551083 Replace BaseException and Exception with RoundupException
John Rouillard <rouilj@ieee.org>
parents: 6005
diff changeset
8 pass
c177e7128dc9 issue2551083 Replace BaseException and Exception with RoundupException
John Rouillard <rouilj@ieee.org>
parents: 6005
diff changeset
9
c177e7128dc9 issue2551083 Replace BaseException and Exception with RoundupException
John Rouillard <rouilj@ieee.org>
parents: 6005
diff changeset
10 class LoginError(RoundupException):
4083
bbab97f8ffb2 XMLRPC improvements:
Stefan Seefeld <stefan@seefeld.name>
parents: 4066
diff changeset
11 pass
bbab97f8ffb2 XMLRPC improvements:
Stefan Seefeld <stefan@seefeld.name>
parents: 4066
diff changeset
12
6005
292c9dfd06bd flake8 formatting fixes.
John Rouillard <rouilj@ieee.org>
parents: 5264
diff changeset
13
6123
c177e7128dc9 issue2551083 Replace BaseException and Exception with RoundupException
John Rouillard <rouilj@ieee.org>
parents: 6005
diff changeset
14 class Unauthorised(RoundupException):
4083
bbab97f8ffb2 XMLRPC improvements:
Stefan Seefeld <stefan@seefeld.name>
parents: 4066
diff changeset
15 pass
bbab97f8ffb2 XMLRPC improvements:
Stefan Seefeld <stefan@seefeld.name>
parents: 4066
diff changeset
16
6123
c177e7128dc9 issue2551083 Replace BaseException and Exception with RoundupException
John Rouillard <rouilj@ieee.org>
parents: 6005
diff changeset
17 class RejectBase(RoundupException):
c177e7128dc9 issue2551083 Replace BaseException and Exception with RoundupException
John Rouillard <rouilj@ieee.org>
parents: 6005
diff changeset
18 pass
6005
292c9dfd06bd flake8 formatting fixes.
John Rouillard <rouilj@ieee.org>
parents: 5264
diff changeset
19
6123
c177e7128dc9 issue2551083 Replace BaseException and Exception with RoundupException
John Rouillard <rouilj@ieee.org>
parents: 6005
diff changeset
20 class Reject(RejectBase):
4083
bbab97f8ffb2 XMLRPC improvements:
Stefan Seefeld <stefan@seefeld.name>
parents: 4066
diff changeset
21 """An auditor may raise this exception when the current create or set
2129
3fd672293712 add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
22 operation should be stopped.
3fd672293712 add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
23
3fd672293712 add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
24 It is up to the specific interface invoking the create or set to
3fd672293712 add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
25 handle this exception sanely. For example:
3fd672293712 add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
26
3fd672293712 add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
27 - mailgw will trap and ignore Reject for file attachments and messages
3fd672293712 add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
28 - cgi will trap and present the exception in a nice format
4083
bbab97f8ffb2 XMLRPC improvements:
Stefan Seefeld <stefan@seefeld.name>
parents: 4066
diff changeset
29 """
2129
3fd672293712 add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
30 pass
3fd672293712 add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
31
5004
494d255043c9 Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents: 4083
diff changeset
32
494d255043c9 Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents: 4083
diff changeset
33 class RejectRaw(Reject):
494d255043c9 Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents: 4083
diff changeset
34 """
494d255043c9 Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents: 4083
diff changeset
35 Performs the same function as Reject, except HTML in the message is not
494d255043c9 Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents: 4083
diff changeset
36 escaped when displayed to the user.
494d255043c9 Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents: 4083
diff changeset
37 """
494d255043c9 Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents: 4083
diff changeset
38 pass
494d255043c9 Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents: 4083
diff changeset
39
494d255043c9 Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents: 4083
diff changeset
40
4066
042ace5ddb7c Move 'UsageError' definition from roundup.admin to roundup.exceptions.
Stefan Seefeld <stefan@seefeld.name>
parents: 2129
diff changeset
41 class UsageError(ValueError):
042ace5ddb7c Move 'UsageError' definition from roundup.admin to roundup.exceptions.
Stefan Seefeld <stefan@seefeld.name>
parents: 2129
diff changeset
42 pass
042ace5ddb7c Move 'UsageError' definition from roundup.admin to roundup.exceptions.
Stefan Seefeld <stefan@seefeld.name>
parents: 2129
diff changeset
43
2129
3fd672293712 add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff changeset
44 # vim: set filetype=python ts=4 sw=4 et si

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