Module: Pvectl::ExitCodes

Defined in:
lib/pvectl/exit_codes.rb

Overview

Application exit codes following UNIX conventions.

This module defines standard exit codes used by pvectl to communicate process termination status. Codes are aligned with UNIX conventions and section 6.1 of ARCHITECTURE.md.

Examples:

Usage in error handling

exit Pvectl::ExitCodes::USAGE_ERROR if invalid_arguments?

Checking exit code in bash scripts

pvectl get nodes || echo "Error: code $?"

See Also:

Constant Summary collapse

SUCCESS =

Returns Operation completed successfully.

Returns:

  • (Integer)

    Operation completed successfully

0
GENERAL_ERROR =

Returns General application error (unhandled exception).

Returns:

  • (Integer)

    General application error (unhandled exception)

1
USAGE_ERROR =

Returns CLI usage error (invalid arguments, unknown command).

Returns:

  • (Integer)

    CLI usage error (invalid arguments, unknown command)

2
CONFIG_ERROR =

Returns Configuration error (missing file, invalid format).

Returns:

  • (Integer)

    Configuration error (missing file, invalid format)

3
CONNECTION_ERROR =

Returns Proxmox API connection error (timeout, no network).

Returns:

  • (Integer)

    Proxmox API connection error (timeout, no network)

4
NOT_FOUND =

Returns Requested resource not found.

Returns:

  • (Integer)

    Requested resource not found

5
PERMISSION_DENIED =

Returns Permission denied for resource or operation.

Returns:

  • (Integer)

    Permission denied for resource or operation

6
INTERRUPTED =

Returns Interrupted by user (Ctrl+C / SIGINT).

Returns:

  • (Integer)

    Interrupted by user (Ctrl+C / SIGINT)

130