From e6393eec8c66c01a798b0df92afa1a8b387598f7 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung Date: Thu, 20 Nov 2025 21:49:13 +0800 Subject: [PATCH] docs(exception): add comment for updating exit code doc --- commitizen/exceptions.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commitizen/exceptions.py b/commitizen/exceptions.py index 49cd1832b..baba42a27 100644 --- a/commitizen/exceptions.py +++ b/commitizen/exceptions.py @@ -29,7 +29,7 @@ class ExitCode(IntEnum): INVALID_CONFIGURATION = 19 NOT_ALLOWED = 20 NO_INCREMENT = 21 - UNRECOGNIZED_CHARACTERSET_ENCODING = 22 + CHARACTER_SET_DECODE_ERROR = 22 GIT_COMMAND_ERROR = 23 INVALID_MANUAL_VERSION = 24 INIT_FAILED = 25 @@ -170,7 +170,7 @@ class NotAllowed(CommitizenException): class CharacterSetDecodeError(CommitizenException): - exit_code = ExitCode.UNRECOGNIZED_CHARACTERSET_ENCODING + exit_code = ExitCode.CHARACTER_SET_DECODE_ERROR class GitCommandError(CommitizenException): @@ -215,3 +215,6 @@ class ConfigFileIsEmpty(CommitizenException): class CommitMessageLengthExceededError(CommitizenException): exit_code = ExitCode.COMMIT_MESSAGE_LENGTH_LIMIT_EXCEEDED message = "Length of commit message exceeds the given limit." + + +# When adding a new exit code, please update the documentation of the exit codes in docs/exit_codes.md