COMPSCI 61A Lecture Notes - Lecture 25: Stack Trace, Exception Handling

23 views5 pages
zogo39484755 and 6 others unlocked
COMPSCI 61A Full Course Notes
22
COMPSCI 61A Full Course Notes
Verified Note
22 documents

Document Summary

Midterm 2 scores and solutions will be released wednesday night. Completing the online participation form by wednesday 10/26 @ 11:59pm. A function receives an argument value of an improper type. Some resource (such as a le) is not available. A network connection is lost in the middle of data transmission. Exception: a built-in mechanism in a programming language to declare and respond to exceptional conditions. Python raises an exception whenever an error occurs. Exceptions can be handled by the program, preventing the interpreter from halting. Unhandled exceptions will cause python to halt execution and print a stack trace. If f calls g and g calls h, exceptions can shift control from h to f without waiting for g to return. Exception handling tends to be slow, so it is not used in the standard approach to a program (only non-standard situations) Assert statements raise an exception of type assertionerror.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents