Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion codewiki/cli/utils/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,6 +22,7 @@
EXIT_REPOSITORY_ERROR = 3
EXIT_API_ERROR = 4
EXIT_FILESYSTEM_ERROR = 5
EXIT_INCOMPLETE_GENERATION = 6


class CodeWikiError(Exception):
Expand Down Expand Up @@ -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:
Expand Down