December 2021
Beginner
840 pages
47h 29m
English
Thus far, we have discussed first-class continuations primarily in the context of handling exceptions in programming. Exception handling is a convenient place to start with continuations because it involves transfer of control. In this section, we summarize the mechanisms in programming languages for handling exceptions.
Passing error codes as return values through the run-time stack is a primitive, low-level way of handling exceptions. Consider a program where main calls A, which calls B, which generates an exception. The function B can return an error code to A, which in turn can return that error back to the main program, which can report the error ...
Read now
Unlock full access