Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64acf1d commit 5d1b5eaCopy full SHA for 5d1b5ea
1 file changed
Lib/xml/dom/__init__.py
@@ -38,6 +38,7 @@ class Node:
38
DOCUMENT_FRAGMENT_NODE = 11
39
NOTATION_NODE = 12
40
41
+
42
#ExceptionCode
43
INDEX_SIZE_ERR = 1
44
DOMSTRING_SIZE_ERR = 2
@@ -55,11 +56,17 @@ class Node:
55
56
NAMESPACE_ERR = 14
57
INVALID_ACCESS_ERR = 15
58
59
60
class DOMException(Exception):
61
"""Abstract base class for DOM exceptions.
62
Exceptions with specific codes are specializations of this class."""
63
- pass
64
+ def __init__(self, *args, **kw):
65
+ if self.__class__ is DOMException:
66
+ raise RuntimeError(
67
+ "DOMException should not be instaniated directly")
68
+ apply(Exception.__init__, args, kw)
69
70
71
class IndexSizeErr(DOMException):
72
code = INDEX_SIZE_ERR
0 commit comments