Exception: AnkiConnect::ProtocolError

Inherits:
Error
  • Object
show all
Defined in:
lib/anki_connect/client.rb

Overview

Error raised when the response does not follow the AnkiConnect protocol.

Instance Attribute Summary collapse

Attributes inherited from Error

#action

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, body:, **context) ⇒ ProtocolError

Returns a new instance of ProtocolError.



193
194
195
196
# File 'lib/anki_connect/client.rb', line 193

def initialize(message = nil, body:, **context)
  @body = body
  super(message, **context)
end

Instance Attribute Details

#body ⇒ Object (readonly)

Returns the value of attribute body.



191
192
193
# File 'lib/anki_connect/client.rb', line 191

def body
  @body
end