diff --git a/index.py b/index.py index 625c59d..d5a07d9 100644 --- a/index.py +++ b/index.py @@ -23,6 +23,19 @@ rootLoggerFormatter = logging.Formatter( ) +def handle_exception(exc_type, exc_value, exc_traceback): + if issubclass(exc_type, KeyboardInterrupt): + sys.__excepthook__(exc_type, exc_value, exc_traceback) + return + + rootLogger.critical( + "Uncaught exception", exc_info=(exc_type, exc_value, exc_traceback) + ) + + +sys.excepthook = handle_exception + + if __name__ == "__main__": QCoreApplication.setApplicationName("Arcaea Offline")