class CommandExecutionError
Exception raised when a command execution fails.
Definitions
def initialize(message, status)
Initialize the exception with the specified message and process status.
Signature
-
parameter
messageString The error message.
-
parameter
statusProcess::Status The status object of the failed command.
Implementation
def initialize(message, status)
super(message)
@status = status
end
attr_reader :status
Signature
-
attribute
Process::Status The status object of the failed command.
def exit_code
Helper method for convenience.
Implementation
def exit_code
@status.exitstatus
end