Sha256: 8fd7eb5f1fe3dc86818864d225ed45273b2eae0b2c01b0171d22a79f5cc59d7a

Contents?: true

Size: 911 Bytes

Versions: 21

Compression:

Stored size: 911 Bytes

Contents

module Salesforce
  class InvalidRequest < StandardError
    attr_accessor :error_code
    
    def initialize(error_options, url)
      @error_code = error_options['errorCode']
      super("#{error_options["errorCode"]}: #{error_options["message"]} while accessing #{url}")
    end
  end
  
  class ObjectNotSupported < StandardError
    def initialize(object_name)
      super("The #{object_name} is not supported in SalesForce")
    end
  end
  
  class RecordInvalid < StandardError
    def initialize(object_name, reason)
      super("#{object_name} failed to be saved. #{reason}")
    end
  end
  
  class ColumnNotFound < StandardError
    def initialize(name, table_name)
      super("Column ''#{name}' not found for #{table_name}.")
    end
  end
  
  
  class InvalidCredentials < StandardError; end
  class ObjectDestroyed    < StandardError; end;
  class UnrecognizedColumn < StandardError; end;
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
activeforce-1.5.0 lib/salesforce/errors.rb