module Errawr::ClassMethods

Public Instance Methods

error!(name, context = {}) click to toggle source
# File lib/errawr.rb, line 16
def error!(name, context = {})
  klass = Mapper[name] || Error.new(name, context)
  klass.update_context(context) unless context.empty?
  fail klass
end
register!(key, options = {}) click to toggle source
# File lib/errawr.rb, line 22
def register!(key, options = {})
  Mapper.register!(key, options)
end