module Olelo::ErrorHandler

Public Class Methods

included(base) click to toggle source
# File lib/olelo/hooks.rb, line 3
def self.included(base)
  base.extend(ClassMethods)
end

Public Instance Methods

handle_error(error) click to toggle source
# File lib/olelo/hooks.rb, line 7
def handle_error(error)
  type = error.class
  while type
    self.class.error_handler[type].to_a.each {|prio,method| method.bind(self).call(error) }
    type = type.superclass
  end
end