Commit 9a677c99 authored by Pauline Pommeret's avatar Pauline Pommeret
Browse files

[exceptions] Class XylokError + NoMatch error

parent 3e5af984
""" Definition of the specific errors of the ????.
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)
class NoMatch(XylokError):
""" Exception raised when no match is found by :py:meth:`local_match`
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
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