MCPcopy Create free account
hub / github.com/microsoft/debugpy / swallow_exception

Function swallow_exception

src/debugpy/common/log.py:202–215  ·  view source on GitHub ↗

Logs an exception with full traceback. If format_string is specified, it is formatted with format(*args, **kwargs), and prepended to the exception traceback on a separate line. If exc_info is specified, the exception it describes will be logged. Otherwise, sys.exc_info() - i.e. the

(format_string="", *args, **kwargs)

Source from the content-addressed store, hash-verified

200
201
202def swallow_exception(format_string="", *args, **kwargs):
203 """Logs an exception with full traceback.
204
205 If format_string is specified, it is formatted with format(*args, **kwargs), and
206 prepended to the exception traceback on a separate line.
207
208 If exc_info is specified, the exception it describes will be logged. Otherwise,
209 sys.exc_info() - i.e. the exception being handled currently - will be logged.
210
211 If level is specified, the exception will be logged as a message of that level.
212 The default is "error".
213 """
214
215 _exception(format_string, *args, **kwargs)
216
217
218def reraise_exception(format_string="", *args, **kwargs):

Callers 2

report_pathsFunction · 0.85

Calls 1

_exceptionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…