author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 27 Feb 2023 00:55:27 +0200 | |
changeset 1342 | d6413e1d20b0 |
parent 1148 | 263e9e066981 |
permissions | -rw-r--r-- |
class ParseException(BaseException): def __init__(self, msg, lineno=None, line=None): BaseException.__init__(self) self.msg = msg self.lineno = lineno self.line = line def __repr__(self): if self.lineno is None: return self.msg elif self.line is None: return u":{:d}:{:s}".format(self.lineno, self.msg) else: return u":{:d}: {:s}\nLINE: {:s}".format(self.lineno, self.msg, self.line)