Sha256: ddb8778e829c4736515b612f7937706c2e0e565308e422effc78b96ee0928eb6

Contents?: true

Size: 458 Bytes

Versions: 3

Compression:

Stored size: 458 Bytes

Contents

module ActsAsIcontact
  # Thrown when a configuration value isn't provided or is invalid.
  class ConfigError < 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

3 entries across 3 versions & 2 rubygems

Version Path
SFEley-acts_as_icontact-0.1.1 lib/acts_as_icontact/exceptions.rb
SFEley-acts_as_icontact-0.1.3 lib/acts_as_icontact/exceptions.rb
acts_as_icontact-0.1.1 lib/acts_as_icontact/exceptions.rb