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.
Written by Adam Stankiewicz
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Related Tags
#ruby
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#