Exception: RForce::Wrapper::SalesforceFaultException

Inherits:
Exception
  • Object
show all
Defined in:
lib/rforce-wrapper/exceptions/salesforce_fault_exception.rb

Overview

Raised when a Salesforce Web Services API SOAP response includes a Fault element.

See Also:

Instance Method Summary (collapse)

Constructor Details

- (SalesforceFaultException) initialize(code, message)

Creates a new SalesforceFaultException with the given code and message.

Parameters:

  • code (String)

    the code for the Fault

  • message (String)

    the error messages for the Fault



13
14
15
16
# File 'lib/rforce-wrapper/exceptions/salesforce_fault_exception.rb', line 13

def initialize(code, message)
  @code    = code
  @message = message
end

Instance Method Details

- (String) to_s

Returns a string representation of the Fault, including both the code and the message.

Returns:

  • (String)

    a string representation of the exception



22
23
24
# File 'lib/rforce-wrapper/exceptions/salesforce_fault_exception.rb', line 22

def to_s
  "#{@code}: #{@message}"
end