Mercurial > p > roundup > code
annotate roundup/exceptions.py @ 5179:e8b3d3a14563
- issue2550796: Calendar and Classhelp selection tools don't cause
onchange event to be triggered.
Using the helper popups for modifying lists of users, lists of
issues, dates etc.. now trigger the change event on the form's
field. This allows onchange javascript to trigger to highlight
changes, recalculate other form values etc. See ``upgrading.txt``
for details on applying these changes to your tracker.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 28 Jan 2017 20:58:19 -0500 |
| parents | 494d255043c9 |
| children | 32f95ec6bd8e |
| rev | line source |
|---|---|
| 4083 | 1 """Exceptions for use across all Roundup components. |
| 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 |
| 4083 | 6 class LoginError(Exception): |
| 7 pass | |
| 8 | |
| 9 class Unauthorised(Exception): | |
| 10 pass | |
| 11 | |
|
2129
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
12 class Reject(Exception): |
| 4083 | 13 """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
|
14 operation should be stopped. |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
15 |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
16 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
|
17 handle this exception sanely. For example: |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
18 |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
19 - 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
|
20 - cgi will trap and present the exception in a nice format |
| 4083 | 21 """ |
|
2129
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
22 pass |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
23 |
|
5004
494d255043c9
Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents:
4083
diff
changeset
|
24 |
|
494d255043c9
Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents:
4083
diff
changeset
|
25 class RejectRaw(Reject): |
|
494d255043c9
Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents:
4083
diff
changeset
|
26 """ |
|
494d255043c9
Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents:
4083
diff
changeset
|
27 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
|
28 escaped when displayed to the user. |
|
494d255043c9
Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents:
4083
diff
changeset
|
29 """ |
|
494d255043c9
Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents:
4083
diff
changeset
|
30 pass |
|
494d255043c9
Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents:
4083
diff
changeset
|
31 |
|
494d255043c9
Display errors containing HTML with RejectRaw (issue2550847)
John Kristensen <john@jerrykan.com>
parents:
4083
diff
changeset
|
32 |
|
4066
042ace5ddb7c
Move 'UsageError' definition from roundup.admin to roundup.exceptions.
Stefan Seefeld <stefan@seefeld.name>
parents:
2129
diff
changeset
|
33 class UsageError(ValueError): |
|
042ace5ddb7c
Move 'UsageError' definition from roundup.admin to roundup.exceptions.
Stefan Seefeld <stefan@seefeld.name>
parents:
2129
diff
changeset
|
34 pass |
|
042ace5ddb7c
Move 'UsageError' definition from roundup.admin to roundup.exceptions.
Stefan Seefeld <stefan@seefeld.name>
parents:
2129
diff
changeset
|
35 |
|
2129
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
36 # vim: set filetype=python ts=4 sw=4 et si |
