Module: SwitchException
- Defined in:
- lib/switch-exception.rb,
lib/switch-exception/version.rb
Defined Under Namespace
Classes: ExceptionSwitch
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Method Summary collapse
Instance Method Details
#switch_exception(e, &block) ⇒ Object
4 5 6 7 8 |
# File 'lib/switch-exception.rb', line 4 def switch_exception(e, &block) sw = ExceptionSwitch.new(e) sw.instance_eval(&block) raise e unless sw.handled end |