Skip to content

Commit 26b8f63

Browse files
committed
refactor(exceptions): display startup errors as ClickException
1 parent 4f89774 commit 26b8f63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

silverback/exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(self):
4444

4545

4646
# TODO: `ExceptionGroup` added in Python 3.11
47-
class StartupFailure(SilverbackException):
47+
class StartupFailure(SilverbackException, click.ClickException):
4848
def __init__(self, *exceptions: BaseException | str | None):
4949
if len(exceptions) == 1 and isinstance(exceptions[0], str):
5050
super().__init__(exceptions[0])
@@ -54,7 +54,7 @@ def __init__(self, *exceptions: BaseException | str | None):
5454
super().__init__("Startup failure(s) detected. See logs for details.")
5555

5656

57-
class NoTasksAvailableError(SilverbackException):
57+
class NoTasksAvailableError(StartupFailure):
5858
def __init__(self):
5959
super().__init__("No tasks to execute")
6060

0 commit comments

Comments
 (0)