January 2020
Intermediate to advanced
532 pages
13h 31m
English
Another place where you would normally handle exceptions is at the very top level of the program. Why? One reason is that we may want to avoid the program from crashing due to an uncaught exception. The top level of the program is the very last gate to catch anything, and the program has an option to either recover from the failure (such as doing a soft reset) or gracefully close all the resources and shut down.
When a computer program finishes execution, it normally returns an exit status back to the shell where the program was invoked. In Unix, the usual convention is to indicate successful termination with a zero status and unsuccessful termination with a nonzero status.
Consider the following pseudocode: ...
Read now
Unlock full access