Chapter 12. Exception Handling
A lot can go wrong when a program runs. The user can provide inappropriate input data, a system or network error might occur, or there might simply be a bug in the code that you didn't know was there. Exception handling allows a program to continue running when an exception occurs. The exception is detected and processed in such a way that the program can keep going.
There is no built-in exception handling in Fortran or C. If you want exception handling in these languages, you have to do all the programming work yourself which usually involves a potentially complicated set of if-then statements and error codes. You also have to perform the exception handling where the exception will occur. You can't easily pass the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access