Why use "ensure" during Ruby exception handling? -
this question has answer here:
- begin, rescue , ensure in ruby? 7 answers
using begin => rescue => else => ensure => end blocks, doesn't code after "end" run no matter what? couldn't put put in "ensure" after "end"?
ensure runs no matter what, if exceptions raised in rescue block.
Comments
Post a Comment