(*args, **kwargs)
| 27 | |
| 28 | # Store last error, ignore notify, allow manual error logging |
| 29 | def handleError(*args, **kwargs): |
| 30 | global last_error |
| 31 | if not args: # Manual called |
| 32 | args = sys.exc_info() |
| 33 | silent = True |
| 34 | else: |
| 35 | silent = False |
| 36 | if args[0].__name__ != "Notify": |
| 37 | last_error = args |
| 38 | |
| 39 | if args[0].__name__ == "KeyboardInterrupt": |
| 40 | shutdown("Keyboard interrupt") |
| 41 | elif not silent and args[0].__name__ != "Notify": |
| 42 | logging.exception("Unhandled exception") |
| 43 | if "greenlet.py" not in args[2].tb_frame.f_code.co_filename: # Don't display error twice |
| 44 | sys.__excepthook__(*args, **kwargs) |
| 45 | |
| 46 | |
| 47 | # Ignore notify errors |
nothing calls this directly
no test coverage detected