Robust software requires robust error handling practice. The fact is that an error can be raised at any time, sometimes, unexpectedly. As a responsible programmer, we need to ensure that every path of computation is taken care of, including both the happy paths and unhappy paths. Happy paths refer to program execution that runs normally as expected. Unhappy paths refer to an unexpected outcome due to error conditions.
In this section, we will explore several ways about to catch exceptions and recover from failures effectively.