Exception: Legate::Mcp::RemoteToolError

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

Overview

Error received from a remote MCP server during a tool call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code = nil, data = nil) ⇒ RemoteToolError

Returns a new instance of RemoteToolError.



104
105
106
107
108
# File 'lib/legate/errors.rb', line 104

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



102
103
104
# File 'lib/legate/errors.rb', line 102

def code
  @code
end

#dataObject (readonly)

Returns the value of attribute data.



102
103
104
# File 'lib/legate/errors.rb', line 102

def data
  @data
end

Instance Method Details

#to_sObject



110
111
112
113
114
115
# File 'lib/legate/errors.rb', line 110

def to_s
  str = super
  str += " (Code: #{@code})" if @code
  str += " Data: #{@data.inspect}" if @data
  str
end