Why use "ensure" during Ruby exception handling? -


this question has answer here:

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

Popular posts from this blog

c# - Store DBContext Log in other EF table -

c# - SetBinding not registering for PropertyChanged event -

python - Scrapy spider memory leak -