Write the Python code that will capture and handle the custom exceptions. Here are the steps to
Fantastic news! We've Found the answer you've been seeking!
Question:
1. Subclass the Exception class and create a new Exception class named as Error that contains a message as An exception occurred.
2. Use the try ... except block that will handle the exception and print the message.
Output:
An exception occurred
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: