2👍
✅
It would just be exception.value
since the exception matches the class you are checking. The exception will have the data you used to create it.
Source:stackexchange.com