Exception: Brut::CLI::SystemExecError

Inherits:
Error
  • Object
show all
Defined in:
lib/brut/cli/error.rb

Overview

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, exit_status) ⇒ SystemExecError

Returns a new instance of SystemExecError.

Parameters:

  • command (String|Array)

    or args passed to Executor#system!.

  • exit_status (Integer)

    the exit status of the command.



15
16
17
18
19
# File 'lib/brut/cli/error.rb', line 15

def initialize(command,exit_status)
  super("#{command} failed - exited #{exit_status}")
  @command = command
  @exit_status = exit_status
end

Instance Attribute Details

#commandString|Array (readonly)

Returns command line invocation that caused the error.

Returns:

  • (String|Array)

    command line invocation that caused the error



10
11
12
# File 'lib/brut/cli/error.rb', line 10

def command
  @command
end

#exit_statusInteger (readonly)

Returns exit status of the command.

Returns:

  • (Integer)

    exit status of the command



12
13
14
# File 'lib/brut/cli/error.rb', line 12

def exit_status
  @exit_status
end