small medium large xlarge

Exceptional Ruby: Master the Art of Handling Failure in Ruby now available

May 25, 2011

Just because your code fails doesn’t mean your project should fail. Learn how to properly deal with exceptions and failure handling in Ruby with this new in-depth guide for both Ruby 1.8 and 1.9, now available from

* Tell your friends! Tweet this * Follow on Twitter: @pragprog * Facebook: * Andy @PragmaticAndy and Dave @pragdave

Exceptional Ruby

Exceptional Ruby: Master the Art of Handling Failure in Ruby covers everything from the mechanics of how exceptions work to how to design a robust failure management architecture for your app or library. Whether you are a Ruby novice or a seasoned veteran, Exceptional Ruby will help you write cleaner, more resilient Ruby code.

Inside this electronic-only book, you’ll find:

  • A detailed look at the lifecycle of a Ruby exception.
  • Overriding Kernel#raise for fun and profit.
  • Alternatives to exceptions, for when fail fast isn’t the right answer.
  • How to write a crash logger.
  • Advanced dynamic exception matching in rescue clauses.
  • Avoiding failure cascades with the Barricade and Circuit Breaker patterns.
  • Five questions to ask before raising an exception.
  • Exception safety testing for critical methods.
  • How to create an error API for your library that will make other developers want to kiss you.
  • The three exception classes every app or library needs.
  • And much, much more… over 100 pages of tips, guidelines, and awesome hacks!

This book, available in PDF, mobi, and ePub formats, was entirely written and produced by the author. We are proud to be distributing it.

Now available from

Ruby on Rails II: Real-World Techniques Studio

It’s not too late to reserve your seat in a Studio this summer! Our Ruby on Rails II courses are quickly filling up, but there are still seats available for both offerings:

  • June 22-25 in Denver, CO
  • July 26-29 in Reston, VA

You’ll learn practical, time-saving techniques used in real-world Rails apps from two Rails experts who will share their best practices on a variety of topics, including:

  • Are you designing your application properly?
  • Could your testing be easier and more effective?
  • Have you considered all the security vectors?
  • What’s important to know about Ruby 1.9.2?
  • Are you using the right libraries to make your coding easier?
  • When, where, and how to use jQuery?
  • How can your app benefit from metaprogramming techniques?
  • Will your application perform and scale well enough?

If you’ve written a Rails app or two, but you’re bumping into issues as you try to add more “advanced” features, then this is the next course for you! You’ll come away from this course with practical, immediate ways to make your existing Rails app shine!

Details available at

Coming Soon:

  • Designed for Use: Create Usable Interfaces for Applications and the Web in print
  • Continuous Testing: with Ruby, Rails, and JavaScript in print
  • Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors in print
  • iOS Recipes: Tips and Tricks for Awesome iPhone and iPad Apps in print

Recently Released:

  • CoffeeScript: Accelerated JavaScript Development [in beta]
  • Code in the Cloud: Programming Google AppEngine [in print]
  • Test-Driven Development for Embedded C [in print]
  • Crafting Rails Applications: Expert Practices for Everyday Rails Development [in print]
  • Thanks for your continued support,

    Dave & Andy

    Books  *  eBooks  *  Screencasts  *   PragPub Magazine