Python - Custom Exceptions
What will this code output?
class Error(Exception):
def __str__(self):
return 'Custom error occurred'
try:
raise Error()
except Error as e:
print(e)