mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-11 05:30:17 +00:00
impr: log uncaught exceptions
This commit is contained in:
parent
55ef2ba3bb
commit
d918032b9c
13
index.py
13
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")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user