Преглед на файлове

Make VisitError inherit from LarkError

The recently added VisitError is the only lark exception not inheriting from LarkError,
which makes it painful to catch for client application.
tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.6.6
Aurelien Grenotton преди 5 години
родител
ревизия
cbafa4d7bb
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. +1
    -1
      lark/exceptions.py

+ 1
- 1
lark/exceptions.py Целия файл

@@ -86,7 +86,7 @@ class UnexpectedToken(ParseError, UnexpectedInput):

super(UnexpectedToken, self).__init__(message)

class VisitError(Exception):
class VisitError(LarkError):
def __init__(self, tree, orig_exc):
self.tree = tree
self.orig_exc = orig_exc


Зареждане…
Отказ
Запис