Error Handling, Raise Exception doubt

https://online.codingblocks.com/app/player/209779/content/201871/8387/lecture
at 5:07 in this video, are we adding a custom exception to the base class Exception using raise? if not how did

except Exception as e:

  print(e)

print the custom error given to the MyException class?

Hey @devchopra999_11c6416ab7f09bbf,
Yes we are adding custom exception by inheriting Exception class and then adding new exception and then by raise se we are giving our custom exception.

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.