From efad507ac9038d9bfb606bb93a60492bd64c9e4d Mon Sep 17 00:00:00 2001 From: Perceval <36658095+perce7al@users.noreply.github.com> Date: Sun, 11 Oct 2026 10:45:56 +0300 Subject: [PATCH] feat: add dedicated exit code for incomplete generation --- codewiki/cli/utils/errors.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codewiki/cli/utils/errors.py b/codewiki/cli/utils/errors.py index cf4f89b5..ba2f5a35 100644 --- a/codewiki/cli/utils/errors.py +++ b/codewiki/cli/utils/errors.py @@ -8,6 +8,7 @@ 3: Repository error (not a git repo, no code files) 4: LLM API error (including rate limits) 5: File system error (permissions, disk space) + 6: Incomplete generation (module docs missing; re-run to resume) """ import sys @@ -21,6 +22,7 @@ EXIT_REPOSITORY_ERROR = 3 EXIT_API_ERROR = 4 EXIT_FILESYSTEM_ERROR = 5 +EXIT_INCOMPLETE_GENERATION = 6 class CodeWikiError(Exception): @@ -65,7 +67,7 @@ class IncompleteGenerationError(CodeWikiError): def __init__(self, message: str, missing_modules: list = None): self.missing_modules = missing_modules or [] - super().__init__(message, EXIT_GENERAL_ERROR) + super().__init__(message, EXIT_INCOMPLETE_GENERATION) def handle_error(error: Exception, verbose: bool = False) -> int: