Hacker News new | ask | show | jobs
by ljm 957 days ago
The examples show you a simple way to do things that limit complexity, especially for learners. Any decently sized library or application switches to descriptive error classes once they become sufficiently complex, because stateful error handling (as ActiveRecord does it) is painful.

I'd argue that now Ruby has some kind of pattern matching, it can take the place of using exceptions for control flow. You can just return the class itself instead of raising it, then match on it.