def except_hook(exception_type, value, tb):
if show_messagebox_on_exception:
focused_widget = QApplication.focusWidget()
if focused_widget:
if exception_type == type_defs.GDBInitializeException:
QMessageBox.information(focused_widget, "Error", "GDB isn't initialized yet")
elif exception_type == type_defs.InferiorRunningException:
error_dialog = InputDialogForm(item_list=[("Process is running" +
"\nPress " + break_hotkey + " to stop process" +
"\n\nGo to settings->General to disable this dialog",)])
error_dialog.exec_()
traceback.print_exception(exception_type, value, tb)
# From version 5.5 and onwards, PyQT calls qFatal() when an exception has been encountered
# So, we must override sys.excepthook to avoid calling of qFatal()
评论列表
文章目录