I sometimes use the fact that you can pass blocks to a method, and I have method recovery errors, and my code can continue on its way.
def check_block yield rescue NoMethodError => e <<-EOR Error raised with message "#{e}". Backtrace would be
This first block will pass and save the returned report, the second will work fine.
This salvation saves only NoMethodError , while you may need to save other errors.
vgoff source share