Sha256: 5f290606e7302ba266fbea7d2e31c83fbdef4c945faf9a76e3617faf70bf4bcd

Contents?: true

Size: 678 Bytes

Versions: 15

Compression:

Stored size: 678 Bytes

Contents

module ActsAsIcontact
  # Thrown when a configuration value isn't provided or is invalid.
  class ConfigError < StandardError; end
  
  # Thrown when a bad parameter is passed to a resource find.
  class QueryError < StandardError; end
  
  # Thrown before saving if iContact validation rules are not met.
  class ValidationError < StandardError; end
  
  # Thrown when a resource calls save! and fails. Contains the +.errors+ array from
  # the resource.
  class RecordNotSaved < StandardError
    attr_reader :errors
    
    def initialize(errors = [])
      @errors = errors
    end
    
    def message
      errors.first
    end
    alias_method :error, :message
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
SFEley-acts_as_icontact-0.1.4 lib/acts_as_icontact/exceptions.rb
SFEley-acts_as_icontact-0.1.5 lib/acts_as_icontact/exceptions.rb
SFEley-acts_as_icontact-0.2.0 lib/acts_as_icontact/exceptions.rb
SFEley-acts_as_icontact-0.2.1 lib/acts_as_icontact/exceptions.rb
SFEley-acts_as_icontact-0.2.3 lib/acts_as_icontact/exceptions.rb
SFEley-acts_as_icontact-0.2.4 lib/acts_as_icontact/exceptions.rb
SFEley-acts_as_icontact-0.3.0 lib/acts_as_icontact/exceptions.rb
SFEley-acts_as_icontact-0.3.2 lib/acts_as_icontact/exceptions.rb
acts_as_icontact-0.3.2 lib/acts_as_icontact/exceptions.rb
acts_as_icontact-0.1.5 lib/acts_as_icontact/exceptions.rb
acts_as_icontact-0.2.0 lib/acts_as_icontact/exceptions.rb
acts_as_icontact-0.2.1 lib/acts_as_icontact/exceptions.rb
acts_as_icontact-0.2.3 lib/acts_as_icontact/exceptions.rb
acts_as_icontact-0.2.4 lib/acts_as_icontact/exceptions.rb
acts_as_icontact-0.3.0 lib/acts_as_icontact/exceptions.rb