I am very, very excited to announce that the final version of my new eBook “Exceptional Ruby” is now available for immediate purchase. Originally born out of the realization that I had more material about Ruby failure handling than I could fit into a single talk, Exceptional Ruby has grown to over 100 pages of detailed technical content.
My intent with this book is to provide nothing short of the definitive guide to exceptions and failure handling in Ruby. No other book covers the topic at this level of detail. In fact, I’m confident that unless your name is Matz, you’ll find something in here you didn’t know about Ruby exception handling.
The book starts with an in-depth tour of the Ruby exception lifecycle, with some fun hacks along the way, such as replacing
raise with your own methods and making
rescuematch exceptions on conditions other than their class. It goes on to look at different ways of responding to failures, including some notes on avoiding cascading failure situations. After that comes a comprehensive list of alternatives to exceptions, for cases where “fail fast” isn’t the right choice. It concludes with an extended collection of tips and guidelines for structuring a robust failure management architecture, including a guide to exception-safety testing and a list of the three exception classes I think every program needs.
But that’s not all; in the appendices, I’ll step you through the implementation of my exception tester class, and then take you on a whirlwind tour of the Ruby standard exception hierarchy.
Enjoy, won’t you?
I’ve done my level best to include every last bit of knowledge about handling failure in Ruby code that I’ve collected over 10 years of using the language. I hope you’ll check it out. And when you do, please let me know what you think, and if there’s anything I can clarify or fix.