PINCE.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:PINCE 作者: korcankaraokcu 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号