q4wzua
Last Updated: February 25, 2016
·
461
· sheerun
Photo on 08.01.2013 at 04.15

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.

Say Thanks
Respond