MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / CommitizenException

Class CommitizenException

commitizen/exceptions.py:51–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51class CommitizenException(Exception):
52 exit_code: ExitCode
53 message: str
54
55 def __init__(self, *args: str, **kwargs: Any) -> None:
56 self.output_method = kwargs.get("output_method") or out.error
57 self.exit_code: ExitCode = self.__class__.exit_code
58 if args:
59 self.message = args[0]
60 elif hasattr(self.__class__, "message"):
61 self.message = self.__class__.message
62 else:
63 self.message = ""
64
65 def __str__(self) -> str:
66 return self.message
67
68
69class ExpectedExit(CommitizenException):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected