exception_wrapping_example.rb

Path: examples/exception_wrapping_example.rb
Last Update: Wed Mar 26 10:22:16 -0500 2008

Example demonstrating "wrapping" an exception; rescuing an exception and throwing a different one. A common use for this is to map exceptions across "domain" boundaries, e.g., persistence and application logic domains. Note that you must use :around advice, since :after_raising cannot change the control flow. (However, see feature request 19119)

Required files

aquarium  

[Validate]