What frosch
is doing under the hood is basically following:
def _hook():
"""Overwrite sys.excepthook"""
sys.excepthook = pytrace_excepthook
We just overwrite the sys.excepthook
, which is the function called, when the python program provokes a runtime error. This is catched by the cpython
runtime and propagated through it.
You can find the source here