RubyFlow The Ruby and Rails community linklog

Rescue StandardError, not Exception

Sometimes our Ruby programs throw errors which we don’t have full control over, such as network timeouts. So, we need to catch and handle those errors. To do so, we need to choose an Exception-descended class (or classes) to catch. What’s the right granularity of that class?

Rescue StandardError, not Exception.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in