Exception: NewRelic::Commands::CommandFailure

Inherits:
StandardError
  • Object
show all
Defined in:
lib/new_relic/commands/deployments.rb

Overview

Capture a failure to execute the command. Ask it for a return status to exit the vm with, if appropriate.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, return_status = nil) ⇒ CommandFailure

Returns a new instance of CommandFailure.



21
22
23
24
# File 'lib/new_relic/commands/deployments.rb', line 21

def initialize message, return_status=nil
  super message
  @exit_code = return_status || 0
end

Instance Attribute Details

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



20
21
22
# File 'lib/new_relic/commands/deployments.rb', line 20

def exit_code
  @exit_code
end