June 2002
Beginner to intermediate
640 pages
14h 24m
English
Terms in This Chapter
Call stack
Catchall bucket, exception handler
catch statement
Class-based exception
else clause
Error
except clause
Exception
Exception class
Exception handling
finally clause
Granularity
Most to least specific order
raise statement
Throwing versus raising
try block
try statement
Suite
User-defined versus built-in exception
Bad things happen to good programs: Disks crash, files are corrupted, and batteries fail. Such things are typically more the exception than the rule, and to plan for all of them would make for some very complicated code. That's why modern programming languages like Python have the ability to handle bad things, called exceptions in programming speak.
The old way of dealing with errors was ...
Read now
Unlock full access