Module: Exceptor::InstanceMethods
- Defined in:
- lib/exceptor/instance_methods.rb
Instance Method Summary collapse
Instance Method Details
#exceptor(constant = nil, &block) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/exceptor/instance_methods.rb', line 4 def exceptor(constant = nil,&block) constant ||= self.class._default_exceptor begin block.call rescue => e instance_exec(ContextDelegator.new(block.binding),e,&constant.exceptors[e.class]) end end |