-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
Test code:
from functools import wraps
def catch_all(fn):
@wraps(fn)
def wrapper(*args, **kwargs):
try:
return fn(*args, **kwargs)
except:
log.error(f"gotcha")
#raise
return wrapper
@service('exception_test.test1')
def test1(**kwargs):
try:
raise Exception("will be caught")
except:
log.error("this is fine")
#raise
# result = this is fine
@service('exception_test.test2')
@catch_all
def test2(**kwargs):
raise Exception("will NOT be caught")
# result = exceptionExpected:
"gotcha" error in logs when running exception_test.test2
Actual Result:
Exception in <file.exception_test.test2> line 32: raise Exception("will NOT be caught") ^ Exception: will NOT be caught
dmamelin
Metadata
Metadata
Assignees
Labels
No labels