Understanding the Ruby exception hierarchy
In this post we look at Ruby's exception class heirarchy, and how you can use it to be as broad or as narrow as you like when rescuing exceptions.
In this post we look at Ruby's exception class heirarchy, and how you can use it to be as broad or as narrow as you like when rescuing exceptions.
Exceptions are classes, just like everything else in Ruby. This post will show you how to create your own custom exceptions without falling into some common traps that snare beginners.
Never rescue Exception in Ruby! - Maybe you've heard this before. It's good advice, but it's pretty confusing unless you're already in the know. Let's break this statement down and see what it means.