Exception: Rake::Funnel::ExecutionError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command = nil, exit_code = nil, output = nil, description = nil) ⇒ ExecutionError

Returns a new instance of ExecutionError.



6
7
8
9
10
11
12
13
# File 'lib/rake/funnel/execution_error.rb', line 6

def initialize(command = nil, exit_code = nil, output = nil, description = nil)
  super(description)

  @description = description
  @command = command
  @exit_code = exit_code
  @output = output
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



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

def command
  @command
end

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



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

def exit_code
  @exit_code
end

#outputObject (readonly)

Returns the value of attribute output.



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

def output
  @output
end

Instance Method Details

#to_sObject



15
16
17
18
19
20
21
# File 'lib/rake/funnel/execution_error.rb', line 15

def to_s
  msg = [] << inspect_description << inspect_command << inspect_exit_code << last_output
  msg = msg.flatten.compact
  msg = [super.to_s] if msg.empty?

  msg.join("\n")
end