Answer the question
In order to leave comments, you need to log in
How to do custom Exceptions correctly?
Good afternoon. Can I somehow catch the exception through a custom error without explicitly raising it?
I want to do something like
class TestException(Exception):
pass
try:
...
except TestException as e:
print(e)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question