Commit ab818e94 authored by Pauline Pommeret's avatar Pauline Pommeret
Browse files

[XylokExceptions] git mv + use of super()

parent 487c0c51
#!/usr/bin/env python2.7
""" Definition of the specific errors of the ????.
All of them inherit :py:class:`XylokError`.
......@@ -6,7 +7,8 @@ All of them inherit :py:class:`XylokError`.
class XylokError(Exception):
""" Base class for exception in the TRX module. """
def __init__(self, msg=""):
Exception.__init__(self, msg)
# Use of super instead of explicit because
super(XylokError, self).__init__(msg)
class NoMatch(XylokError):
""" Exception raised when no match is found by :py:meth:`local_match`
......@@ -14,10 +16,6 @@ class NoMatch(XylokError):
expr -- input expression in which the error occured
def __init__(self, expr, msg):
self.msg = msg
def __str__(self):
return XylokError.__str__(self) + self.msg
def __init__(self, msg):
super(NoMatch, self).__init__(msg)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment