Last Updated: February 25, 2016
·
705
· sheerun

Avoid rescuing StandardError and Exception

This includes postfix rescues like:

tree = Model.to_tree rescue []

Although they have clean syntax, they hide real errors and make debugging more difficult.

It's also noticeable that rescuing Exception broadens the match.