Python Programming - Tricky Questions - Discussion
Discussion Forum : Tricky Questions - General Questions (Q.No. 10)
10.
Consider the following Python code:
class CustomError(Exception):
def __init__(self, message):
super().__init__(message)
raise CustomError("An example custom error.")
What will happen when this code is executed?
Answer: Option
Explanation:
The code raises a custom error of type
CustomError
with the specified message.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers