Use a dedicated exception for rc_cmd.fatal()
This commit is contained in:
parent
a49bd98ec6
commit
a06fdad034
@ -28,6 +28,10 @@ class NoResponse:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class RemoteControlError(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class MatchError(ValueError):
|
class MatchError(ValueError):
|
||||||
|
|
||||||
hide_traceback = True
|
hide_traceback = True
|
||||||
@ -115,7 +119,7 @@ class RemoteCommand:
|
|||||||
|
|
||||||
def fatal(self, msg: str) -> NoReturn:
|
def fatal(self, msg: str) -> NoReturn:
|
||||||
if running_in_kitty():
|
if running_in_kitty():
|
||||||
raise Exception(msg)
|
raise RemoteControlError(msg)
|
||||||
raise SystemExit(msg)
|
raise SystemExit(msg)
|
||||||
|
|
||||||
def get_default(self, name: str, missing: Any = None) -> Any:
|
def get_default(self, name: str, missing: Any = None) -> Any:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user