Mercurial > p > roundup > code
annotate roundup/exceptions.py @ 3909:e89bcb28f683
indexargs_url force ids to int
ids appear as hyperdb.String instances, which confused indexargs_url when they
appear in the filterspec. They need to be treated as treated as integers when
generating URLs.
It feels sort of hacky to check for 'id' like this but I'm at a loss for what
else to do in this case. Suggestions are welcome :)
Maybe we should look into using some other hyperdb class to represent ids?
this fixes [SF#783492]
Some trailing whitespace also got trimmed.
| author | Justus Pendleton <jpend@users.sourceforge.net> |
|---|---|
| date | Tue, 18 Sep 2007 16:59:42 +0000 |
| parents | 3fd672293712 |
| children | 042ace5ddb7c |
| rev | line source |
|---|---|
|
2129
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
1 #$Id: exceptions.py,v 1.1 2004-03-26 00:44:11 richard Exp $ |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
2 '''Exceptions for use across all Roundup components. |
|
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 |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
5 __docformat__ = 'restructuredtext' |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
6 |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
7 class Reject(Exception): |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
8 '''An auditor may raise this exception when the current create or set |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
9 operation should be stopped. |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
10 |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
11 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
|
12 handle this exception sanely. For example: |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
13 |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
14 - 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
|
15 - cgi will trap and present the exception in a nice format |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
16 ''' |
|
3fd672293712
add and use Reject exception [SF#700265]
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
17 pass |
|
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 # vim: set filetype=python ts=4 sw=4 et si |
