Python Programming - Exception Handling - Discussion

Discussion Forum : Exception Handling - General Questions (Q.No. 24)
24.
What is the purpose of the sys.exc_info() function?
To define custom exception classes
To terminate the program immediately
To retrieve information about the currently handled exception
To raise exceptions intentionally
Answer: Option
Explanation:
sys.exc_info() returns a tuple of information about the currently handled exception, including the type, value, and traceback.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.