Exception: OmniAI::MCP::JRPC::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/omniai/mcp/jrpc/error.rb

Overview

Examples:

raise OmniAI::MCP::JRPC::Error.new(code: OmniAI::MCP::JRPC::Error::PARSE_ERROR, message: "Invalid JSON")

Defined Under Namespace

Modules: Code

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:, message:) ⇒ Error

Returns a new instance of Error.

Parameters:

  • code (Integer)
  • message (String)
[View source]

27
28
29
30
31
32
# File 'lib/omniai/mcp/jrpc/error.rb', line 27

def initialize(code:, message:)
  super("code=#{code} message=#{message}")

  @code = code
  @message = message
end

Instance Attribute Details

#codeInteger

Returns:

  • (Integer)

19
20
21
# File 'lib/omniai/mcp/jrpc/error.rb', line 19

def code
  @code
end

#messageString

Returns:

  • (String)

23
24
25
# File 'lib/omniai/mcp/jrpc/error.rb', line 23

def message
  @message
end