1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-04 08:02:34 +03:00

applied patch from Malcolm Tredinnick fixing python exception hierarchy

* python/libxml.py: applied patch from Malcolm Tredinnick fixing
  python exception hierarchy #139824
Daniel
This commit is contained in:
Daniel Veillard
2004-09-28 11:08:27 +00:00
parent 807b4de282
commit a81355ef66
2 changed files with 12 additions and 4 deletions

View File

@ -1,28 +1,31 @@
import libxml2mod
import types
# The root of all libxml2 errors.
class libxmlError(Exception): pass
#
# Errors raised by the wrappers when some tree handling failed.
#
class treeError:
class treeError(libxmlError):
def __init__(self, msg):
self.msg = msg
def __str__(self):
return self.msg
class parserError:
class parserError(libxmlError):
def __init__(self, msg):
self.msg = msg
def __str__(self):
return self.msg
class uriError:
class uriError(libxmlError):
def __init__(self, msg):
self.msg = msg
def __str__(self):
return self.msg
class xpathError:
class xpathError(libxmlError):
def __init__(self, msg):
self.msg = msg
def __str__(self):