September 2021
Intermediate to advanced
504 pages
12h 50m
English
This chapter covers
Option to encode success and ignore failureEither to encode successes and failuresWe noted briefly in chapter 1 that throwing an exception is a side effect and an undesired behavior. But why do we consider throwing exceptions bad? Why is it not the desired effect? The answer has much to do with a loss of control. At the point that an exception is thrown, control is delegated away from the program, and the exception is propagated up the call stack. This loss of control means one of two things: the program will be terminated because ...
Read now
Unlock full access