Skip to content

Commit a06fdad

Browse files
committed
Use a dedicated exception for rc_cmd.fatal()
1 parent a49bd98 commit a06fdad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

kitty/rc/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class NoResponse:
2828
pass
2929

3030

31+
class RemoteControlError(Exception):
32+
pass
33+
34+
3135
class MatchError(ValueError):
3236

3337
hide_traceback = True
@@ -115,7 +119,7 @@ def __init__(self) -> None:
115119

116120
def fatal(self, msg: str) -> NoReturn:
117121
if running_in_kitty():
118-
raise Exception(msg)
122+
raise RemoteControlError(msg)
119123
raise SystemExit(msg)
120124

121125
def get_default(self, name: str, missing: Any = None) -> Any:

0 commit comments

Comments
 (0)