Class: Rack::RPC::Error

Inherits:
XMLRPC::FaultException
  • Object
show all
Defined in:
lib/rack/rpc/error.rb

Overview

Represents an RPC Exception service.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Error) initialize(code, message, data = nil)

Creates a new rpc related exception. This is useful if one wants to define custom exceptions.

Parameters:

  • code (Fixnum)

    an error code for the exception (used for mapping on the client side)

  • message (String)

    the message that should be send along

  • a (Object)

    data object that may contain additional data on the error (CAUTION: this is not possible with XMLRPC)



22
23
24
25
# File 'lib/rack/rpc/error.rb', line 22

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

Instance Attribute Details

- (void) data (readonly)

Returns the value of attribute data



8
9
10
# File 'lib/rack/rpc/error.rb', line 8

def data
  @data
end