Exception: WorldMonitor::MCPError
- Defined in:
- lib/worldmonitor.rb
Overview
A JSON-RPC error returned by the MCP server.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(code, message, data = nil) ⇒ MCPError
constructor
A new instance of MCPError.
Constructor Details
#initialize(code, message, data = nil) ⇒ MCPError
Returns a new instance of MCPError.
65 66 67 68 69 70 |
# File 'lib/worldmonitor.rb', line 65 def initialize(code, , data = nil) @code = code @data = data hint = code == MCP_AUTH_ERROR_CODE ? " #{AUTH_HINT}" : "" super("MCP error #{code}: #{}#{hint}") end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
63 64 65 |
# File 'lib/worldmonitor.rb', line 63 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
63 64 65 |
# File 'lib/worldmonitor.rb', line 63 def data @data end |