Module: Olelo::ErrorHandler
- Included in:
- Application
- Defined in:
- lib/olelo/hooks.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 |
# File 'lib/olelo/hooks.rb', line 3 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#handle_error(error) ⇒ Object
7 8 9 10 11 12 13 |
# 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 |