How to pass a variable to an exception in Python?
I have created an exception class as follows
class ExampleException(Exception):
pass
How can I give it a variable when it gets raised and then retrieve that variable when I handle it in the try-except block?