Sha256: e1a654b1e69db0e721022ccfcfaa5886f65c3577cf261b30bb71717fc259c160
Contents?: true
Size: 1.07 KB
Versions: 64
Compression:
Stored size: 1.07 KB
Contents
# This file contains all the error classes for this gem. module DispatchRider # The base error class of the gem class DispatchRiderError < StandardError end # The error class for objects not being found class NotFound < DispatchRiderError def initialize(name) super("#{name.to_s} could not be found") end end # The error class for keys not registered in a registrar class NotRegistered < DispatchRiderError def initialize(name) super("#{name.to_s} has not been registered") end end # This error is raised when a queue service depends on an external library, but that is not present class AdapterNotFoundError < DispatchRiderError def initialize(lib_name, gem_name) super("Constant #{lib_name} wasn't found. Please install the #{gem_name} gem") end end # This error is raised when validation fails on an object class RecordInvalid < DispatchRiderError def initialize(object, error_messages) super("#{object.class.name} is not valid because of the following errors : #{error_messages.to_sentence}") end end end
Version data entries
64 entries across 64 versions & 1 rubygems