Creating custom exception types

suggest change

Create a class inheriting from Exception:

class FooException(Exception):
    pass
try:
    raise FooException("insert description here")
except FooException:
    print("A FooException was raised.")

or another exception type:

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents