INNER CODE UNIT · Python
print_errors
mongodb/mongo-c-driver · lldb_bson.py:98
def print_errors(fn: FuncT) -> FuncT:
"""Exceptions from the decorated function will be printed, then re-raised"""
@functools.wraps(fn)
def _wrap(*args: Any, **kwargs: Any) -> Any:
try:
return fn(*args, **kwargs)
except:
e = traceback.format_exc()
print(e)
raise
return cast('FuncT', _wrap)
@print_errors
def __lldb_init_module(debugger: SBDebugger, internal_dict: InternalDict):
# Inject the global magic document traverser: