Skip to content

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 - Trestle project 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)

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 - Trestle project 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)
    """

    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
AUTH_ERROR ¤
COMMAND_ERROR ¤
DOCUMENTS_VALIDATION_ERROR ¤
INCORRECT_ARGS ¤
IO_ERROR ¤
OSCAL_VALIDATION_ERROR ¤
SUCCESS ¤
TRESTLE_ROOT_ERROR ¤
UNKNOWN_ERROR ¤

handler: python