Per method exception and ensure handlers
April 17th, 2006
In Ruby, methods automatically define begin/end blocks. That makes it easy to write exception handlers and ensure blocks:
It is important to re-raise the exception in the exception handler, or else the exception will be silently thrown away.
Leave a Reply