Closed GoogleCodeExporter closed 9 years ago
Doing a search on jbrout code, apart from the CommandException class above,
there is
a number of 'raise "a string"' which is apparently deprecated (cf. R217 which
corrected it in db.py).
As for CommandException, it seems it could be replaced by Exception("str") for
the
raise, and the class CommandException be dropped.
Original comment by chartier...@gmail.com
on 10 Sep 2009 at 10:31
If one doesn't wish to drop the class CommandException in tools.py, I propose to
replace its current definition by:
class CommandException(Exception):
def __init__(self,m):
self.args=[m]
def __str__(self):
return self.args[0]
It seems to work correctly with python 2.4, 2.5 and 2.6 (but the old one,
though
deprecated, should work too... don't know why it does not print the message.
As for the "raise" simply followed by a string, I noticed that one in jbrout
main
files (but there are some others in the plugins):
ExternalTools.py line 183:
raise "ExternalTools() : bad constructor"
should be changed to
raise Exception ("ExternalTools() : bad constructor")
Original comment by chartier...@gmail.com
on 18 Sep 2009 at 10:23
This issue was closed by revision r277.
Original comment by r...@wallace.gen.nz
on 16 Dec 2009 at 1:31
Original issue reported on code.google.com by
chartier...@gmail.com
on 1 Sep 2009 at 1:04