I have my own exception classes inheriting from Exception class. I could check if type is in {..my exceptions list..}, but that seems problematic in my case. Is there any other way of checking if the exception is user-defined or Python's built-in exception. Thank you!
EDIT: The problem is that others can write their own exceptions or rename existing exceptions in their files, which I can't possibly keep track of. I need to log built-in exceptions, and ignore exceptions thrown because of user's fault. I need the checking in except block
try:
# something
except Exception as god_knows_what_ex:
# check if built-in
userdefined exceptionhas some attributes that one can check, i'm not sureexc in {.. built-in exceptions list ..}