Skip to content
2000

Exception Handling

image of Exception Handling
Preview this chapter:

In this chapter, we introduce the concept of exception handling in Python. They are used to specify the alternate sequence of actions the program needs to jump to at the occurrence of the event. For example, if we want to print several pages from the printer and somewhere in the middle of the job the paper gets stuck in the printer. In such as situation we would want to jump to the function that aborts the printing and handles this situation by instant shut down of the printer. In such events comes the exception handling. When the program jumps to the exception handler part the current sequence of commands is abandoned and the commands given to the exception handler are executed. After the exception is tackled the programming returns to the point where the marker left.&nbsp;<br>

/content/books/9789815179637.chap8
dcterms_subject,pub_keyword
-contentType:Journal -contentType:Figure -contentType:Table -contentType:SupplementaryData
10
5
Chapter
content/books/9789815179637
Book
false
en
Loading
This is a required field
Please enter a valid email address
Approval was a Success
Invalid data
An Error Occurred
Approval was partially successful, following selected items could not be processed due to error
Please enter a valid_number test