raises a certain exception
You have a specific exception, you must handle the exception by specifying the exception class in the except clause of the block try-except.
(.. except Exception...) , Exception ( ), , -, .
:
,
, try-except. .
try-except , -, try-except, .
from somelib import func
from somelib import SomeException
def wrapper_func(*args, **kwargs):
try:
func(*args, **kwargs)
except SomeException:
pass