Exception: LintTrap::ExecutionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/lint_trap/execution_error.rb

Overview

Error thrown from code that executes an external command.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, output) ⇒ ExecutionError

Returns a new instance of ExecutionError.



6
7
8
9
10
# File 'lib/lint_trap/execution_error.rb', line 6

def initialize(command, output)
  super("An error occurred while running `#{command}`. The output was:\n#{output}")
  @command = command
  @output = output
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



4
5
6
# File 'lib/lint_trap/execution_error.rb', line 4

def command
  @command
end

#outputObject (readonly)

Returns the value of attribute output.



4
5
6
# File 'lib/lint_trap/execution_error.rb', line 4

def output
  @output
end