[XML-SIG] raising exceptions in dom.core

A.M. Kuchling akuchlin@cnri.reston.va.us
Wed, 7 Apr 1999 20:33:46 -0400

Jeff.Johnson@icn.siemens.com writes:
 > The following code shows two class based exceptions but in the first, the
 > message is passed along as an argument to 'raise' while in the second, the
 > message is given in the constructor of the exception.  Should this
 > be changed to use the constructor in both cases?

	It doesn't really matter; "raise exception, argument" is
equivalent to "raise exception(argument)".  See GvR's essay on
exceptions at http://www.python.org/doc/essays/stdexceptions.html .
For consistency, the DOM code should probably pick one of the two
forms and stick with it; the exception(argument) form is probably the
one to choose.  Added to the TODO list.

A.M. Kuchling			http://starship.python.net/crew/amk/
    "I didn't know that there was a downstairs, here."
    "There's a downstairs in everybody. That's where we live."
    -- Lyta and the youngest of the Three, in SANDMAN #58: "The Kindly Ones:2"