Message6623
When a detector has a serious problem (e.g. I/O Error, division by zero,
etc,) ultimately a DetectorError is raised. This is defined in
cgi/exceptions.py.
Now I got a Detector Error without any message about what was wrong.
Looks like the Detector Error *does* print its parameters with python3
but not with python2, see the test-script below.
Anybody in-the-know can tell us how to correctly define a custom
exception in python2 that prints its parameters?
python3:
>>> from roundup.cgi.exceptions import DetectorError
>>> raise DetectorError ('Bla', 'some html', 'some text')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
roundup.cgi.exceptions.DetectorError: ('Bla', 'some html', 'some text')
python2:
>>> from roundup.cgi.exceptions import DetectorError
>>> raise DetectorError ('Bla', 'some html', 'some text')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
roundup.cgi.exceptions.DetectorError |
|
Date |
User |
Action |
Args |
2019-09-09 17:23:40 | schlatterbeck | set | recipients:
+ schlatterbeck |
2019-09-09 17:23:40 | schlatterbeck | set | messageid: <1568049820.08.0.861180611562.issue2551057@roundup.psfhosted.org> |
2019-09-09 17:23:40 | schlatterbeck | link | issue2551057 messages |
2019-09-09 17:23:39 | schlatterbeck | create | |
|