Summary
In this chapter, you've learned how best to handle errors in your Ruby code. You've learned about handling errors using return values, handling errors with exceptions, and the trade-offs between the two approaches.
You've learned how to retry in the case of transient errors when using both approaches, and you've also learned about more advanced techniques, such as exponential backoff and circuit breakers. You've also learned how to properly design exception class hierarchies. Proper error handling is one of the more important aspects of programming, and now you are better prepared to implement errors properly in your application.
In the next chapter, you'll shift gears a little and learn how code formatting can affect maintenance.