[XML-SIG] raising exceptions in dom.core
Jeff.Johnson@icn.siemens.com
Jeff.Johnson@icn.siemens.com
Tue, 6 Apr 1999 14:07:11 -0400
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?
if self.readonly:
raise NoModificationAllowedException, "Read-only node "+repr(self)
self._checkChild(newChild, self)
if newChild._document != self._document:
raise WrongDocumentException("newChild %s created from a "
"different document" %
(repr(newChild),) )