IT 311 Study Guide - Exception Handling, Proposition, Memory Management

4 views9 pages

Document Summary

Assertions can help a programmer read the code, help a compiler compile it, or help the program detect its own defects. When possible, we may also use other data validation techniques to. Separate the main logic of the program from the handling of exceptional cases into semantic blocks, resulting in code that is simpler to read and maintain. Feature a try-catch or in the specific case of python, a try-except, statement. Despite syntactical differences between languages, the concept of exception handling is similar across the board. The intent of exception handling is to ameliorate the problem with grace if this is not possible, you can throw or raise the exception again to be caught by a higher-level exception handler. We may specify to catch an exception generically or precisely, by denoting the exact name of the exceptional case, either language-specified or user- defined. We can even group exceptional cases to handle by adjoining them into a tuple data structure.