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?
Post a comment