Hide tracebacks for parse errors of match expressions
This commit is contained in:
parent
8a9306d1bf
commit
da88eaeb23
1 changed files with 3 additions and 0 deletions
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
class ParseException(Exception):
|
||||
|
||||
hide_traceback = True
|
||||
|
||||
@property
|
||||
def msg(self) -> str:
|
||||
if len(self.args) > 0:
|
||||
|
|
@ -132,6 +134,7 @@ def __init__(self, tt: str):
|
|||
else:
|
||||
super().__init__(f'No location specified before {tt}')
|
||||
|
||||
|
||||
class Parser:
|
||||
|
||||
def __init__(self, allow_no_location: bool = False) -> None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue