Exception: Manceps::ProtocolError

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

Overview

JSON-RPC error from the MCP server.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code: nil, data: nil) ⇒ ProtocolError

Returns a new instance of ProtocolError.



13
14
15
16
17
# File 'lib/manceps/errors.rb', line 13

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



11
12
13
# File 'lib/manceps/errors.rb', line 11

def code
  @code
end

#dataObject (readonly)

Returns the value of attribute data.



11
12
13
# File 'lib/manceps/errors.rb', line 11

def data
  @data
end