MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / handle_uncaught_exception

Function handle_uncaught_exception

tools/donate-cpu-server.py:61–66  ·  view source on GitHub ↗
(exc_type, exc_value, exc_traceback)

Source from the content-addressed store, hash-verified

59
60# Set up an exception hook for all uncaught exceptions so they can be logged
61def handle_uncaught_exception(exc_type, exc_value, exc_traceback):
62 if issubclass(exc_type, KeyboardInterrupt):
63 sys.__excepthook__(exc_type, exc_value, exc_traceback)
64 return
65
66 logging.error("Uncaught exception", exc_info=(exc_type, exc_value, exc_traceback))
67
68
69sys.excepthook = handle_uncaught_exception

Callers

nothing calls this directly

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected