mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 18:22:09 +02:00
Hide tracebacks for parse errors of match expressions
This commit is contained in:
@@ -9,6 +9,8 @@ from typing import Callable, Iterator, List, NamedTuple, Optional, Sequence, Set
|
|||||||
|
|
||||||
class ParseException(Exception):
|
class ParseException(Exception):
|
||||||
|
|
||||||
|
hide_traceback = True
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def msg(self) -> str:
|
def msg(self) -> str:
|
||||||
if len(self.args) > 0:
|
if len(self.args) > 0:
|
||||||
@@ -132,6 +134,7 @@ class NoLocation(ParseException):
|
|||||||
else:
|
else:
|
||||||
super().__init__(f'No location specified before {tt}')
|
super().__init__(f'No location specified before {tt}')
|
||||||
|
|
||||||
|
|
||||||
class Parser:
|
class Parser:
|
||||||
|
|
||||||
def __init__(self, allow_no_location: bool = False) -> None:
|
def __init__(self, allow_no_location: bool = False) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user