Exception: PiAgent::CommandError

Inherits:
Error
  • Object
show all
Defined in:
lib/pi_agent/errors.rb

Overview

Raised when an RPC command returns ‘success: false`. Carries the failing command name so callers can branch on it.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, command: nil) ⇒ CommandError

Returns a new instance of CommandError.



17
18
19
20
# File 'lib/pi_agent/errors.rb', line 17

def initialize(message, command: nil)
  @command = command
  super(message)
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



15
16
17
# File 'lib/pi_agent/errors.rb', line 15

def command
  @command
end