Advertisements
Advertisements
Question
Define the following:
Catching an exception
Short/Brief Note
Advertisements
Solution
Catching an exception means handling of an exception by exception handlers. An exception is said to be caught when a code that is designed to handle a particular exception is executed. Exceptions, if any, are caught in the try block and handled in the except block.
try:
statements
except Exception_Name:
statements for handling exceptionshaalaa.com
Handling Exceptions in Python
Is there an error in this question or solution?
