123456789_123456789_123456789_123456789_123456789_

Exception: XMLRPC::FaultException

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, StandardError
Instance Chain:
self, StandardError
Inherits: StandardError
  • Object
Defined in: lib/xmlrpc/parser.rb

Overview

Raised when the remote procedure returns a fault-structure, which has two accessor-methods #faultCode an Integer, and #faultString a String.

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(faultCode, faultString) ⇒ FaultException

Creates a new FaultException instance.

#faultString is passed to StandardError as the msg of the Exception.

[ GitHub ]

  
# File 'lib/xmlrpc/parser.rb', line 58

def initialize(faultCode, faultString)
  @faultCode   = faultCode
  @faultString = faultString
  super(@faultString)
end

Instance Attribute Details

#faultCode (readonly)

[ GitHub ]

  
# File 'lib/xmlrpc/parser.rb', line 53

attr_reader :faultCode, :faultString

#faultString (readonly)

[ GitHub ]

  
# File 'lib/xmlrpc/parser.rb', line 53

attr_reader :faultCode, :faultString

Instance Method Details

#to_h

The #faultCode and #faultString of the exception in a Hash.

[ GitHub ]

  
# File 'lib/xmlrpc/parser.rb', line 65

def to_h
  {"faultCode" => @faultCode, "faultString" => @faultString}
end