Sha256: a6674d1b85c9da6b33f4e2d98af46f9499c3573dfdb4c8e5ecc32e8eb70cad60
Contents?: true
Size: 848 Bytes
Versions: 5
Compression:
Stored size: 848 Bytes
Contents
# encoding: UTF-8 module MongoMapper # generic MM error class Error < StandardError; end # raised when key expected to exist but not found class KeyNotFound < Error; end # raised when document expected but not found class DocumentNotFound < Error; end # raised when trying to connect using uri with incorrect scheme class InvalidScheme < Error; end # raised when trying to do something not supported, mostly for edocs class NotSupported < Error; end # raised when document not valid and using ! class DocumentNotValid < Error def initialize(document) super("Validation failed: #{document.errors.full_messages.join(", ")}") end end class AccessibleOrProtected < Error def initialize(name) super("Declare either attr_protected or attr_accessible for #{name}, but not both.") end end end
Version data entries
5 entries across 5 versions & 2 rubygems