CSCA48H3 Study Guide - Midterm Guide: Operand, Type Class, Priority Queue
Document Summary
Runtime error: prevent you from using feature, lose information in file working on, causes errors in file. Exception an error that occurs at runtime. Exception object (3 separate clauses: except , try handle exception to wrap region of code. Don"t want program to crash, but handle exception. Executes and monitors statement in 1st block. If no exception occurs, it skips block under. If any exception occurs, it executes statements in except clause except clause and continues: finally perform computation which may raise exception or work without any problems. Clean up resources grabbed (i. e. close window, Whether or not the statements in the try clause close file, disconnect dial-up connection) are successful, finally block will always be executed crash until the finally block runs. Exception is still unhandled, but program will not. Raise to create deliberate exception by using raise statement.