Skip to content

Commit a447651

Browse files
committed
Changed errors to subclass UsageError
1 parent 71a204b commit a447651

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bumpversion/exceptions.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
"""Custom exceptions for BumpVersion."""
2+
from typing import Optional
23

4+
from click import Context, UsageError
35

4-
class BumpVersionError(Exception):
6+
7+
class BumpVersionError(UsageError):
58
"""Custom base class for all BumpVersion exception types."""
69

7-
def __init__(self, message: str):
10+
def __init__(self, message: str, ctx: Optional[Context] = None):
811
self.message = message
12+
self.ctx = ctx
913

1014

1115
class FormattingError(BumpVersionError):

0 commit comments

Comments
 (0)