return_codes
trestle.core.commands.common.return_codes
¤
Trestle command return codes.
Classes¤
CmdReturnCodes (Enum)
¤
Trestle CLI return codes.
SUCCESS - Operation/validation completed successfully COMMAND_ERROR - Generic expected error while executing command (handled by command) INCORRECT_ARGS - Provided arguments were incorrect/incomplete DOCUMENTS_VALIDATION_ERROR - Validation of the markdown or drawio files failed MODEL_VALIDATION_ERROR - Validation of OSCAL model failed TRESTLE_ROOT_ERROR - Workspace setup has failed, the root is not trestle directory IO_ERROR - IO related errors, i.e. permission issue, non-existing file, etc AUTH_ERROR - Authenication error while accessing/storing cache UNKNOWN_ERROR - Unexpected error (unhandled by command) INVALID_MODEL - Loaded model is invalid
Source code in trestle/core/commands/common/return_codes.py
class CmdReturnCodes(enum.Enum):
"""
Trestle CLI return codes.
SUCCESS - Operation/validation completed successfully
COMMAND_ERROR - Generic expected error while executing command (handled by command)
INCORRECT_ARGS - Provided arguments were incorrect/incomplete
DOCUMENTS_VALIDATION_ERROR - Validation of the markdown or drawio files failed
MODEL_VALIDATION_ERROR - Validation of OSCAL model failed
TRESTLE_ROOT_ERROR - Workspace setup has failed, the root is not trestle directory
IO_ERROR - IO related errors, i.e. permission issue, non-existing file, etc
AUTH_ERROR - Authenication error while accessing/storing cache
UNKNOWN_ERROR - Unexpected error (unhandled by command)
INVALID_MODEL - Loaded model is invalid
"""
SUCCESS = 0
COMMAND_ERROR = 1
INCORRECT_ARGS = 2
DOCUMENTS_VALIDATION_ERROR = 3
OSCAL_VALIDATION_ERROR = 4
TRESTLE_ROOT_ERROR = 5
IO_ERROR = 6
AUTH_ERROR = 7
UNKNOWN_ERROR = 8
handler: python