Open virtuald opened 9 years ago
Isn't this handled here? https://github.com/robotpy/robotpy-wpilib/blob/master/wpilib/wpilib/robotbase.py#L189
That only applies to the main thread.
Ah. I see
import sys
def my_except_hook(exctype, value, traceback):
# Warn DS here
sys.__excepthook__(exctype, value, traceback)
sys.excepthook = my_except_hook
Probably best to save the old sys.excepthook
in case something else wants an excepthook as well.
I suspect there's a python mechanism to do this. The DriverStation error reporting mechanism could be used to do this.