コード例 #1
0
ファイル: reporter_GUI.py プロジェクト: anilkunwar/OOF2
def gui_printTraceBack(e_type, e_value, tbacklist):
    # If the mainloop isn't running yet, just display to the terminal.
    # In debugging mode, always display to the terminal.
    if debug.debug() or not guitop.getMainLoop():
        excepthook.printTraceBack(e_type, e_value, tbacklist)
    if guitop.getMainLoop():
        # Transfer control to the main thread to report errors in the GUI.
        res = mainthread.runBlock(errorpopup_, (e_type, e_value, tbacklist))
        if res == ErrorPopUp.ABORT:
            from ooflib.common.IO.GUI import quit
            if not mainthread.runBlock(quit.queryQuit,
                                       kwargs=dict(exitstatus=1)):
                sys.exc_clear() # quitting was cancelled
        else:
            # Not aborting.  Clear the exception because it can
            # contain references to objects and prevent garbage
            # collection.
            sys.exc_clear()
コード例 #2
0
ファイル: reporter_GUI.py プロジェクト: pk-organics/OOF3D
def gui_printTraceBack(e_type, e_value, tbacklist):
    # If the mainloop isn't running yet, just display to the terminal.
    # In debugging mode, always display to the terminal.
    if debug.debug() or not guitop.getMainLoop():
        excepthook.printTraceBack(e_type, e_value, tbacklist)
    if guitop.getMainLoop():
        # Transfer control to the main thread to report errors in the GUI.
        res = mainthread.runBlock(errorpopup_, (e_type, e_value, tbacklist))
        if res == ErrorPopUp.ABORT:
            from ooflib.common.IO.GUI import quit
            if not mainthread.runBlock(quit.queryQuit,
                                       kwargs=dict(exitstatus=1)):
                sys.exc_clear()  # quitting was cancelled
        else:
            # Not aborting.  Clear the exception because it can
            # contain references to objects and prevent garbage
            # collection.
            sys.exc_clear()
コード例 #3
0
ファイル: reporter_GUI.py プロジェクト: anilkunwar/OOF2
def subScriptErrorHandler(e_type, e_value, tbacklist):
    _savedExceptions.append((e_type, e_value, tbacklist))
    if debug.debug() or not guitop.getMainLoop():
        excepthook.printTraceBack(e_type, e_value, tbacklist)
コード例 #4
0
def query():
    global _enable
    return _enable and guitop.getMainLoop()
コード例 #5
0
ファイル: reporter_GUI.py プロジェクト: pk-organics/OOF3D
def subScriptErrorHandler(e_type, e_value, tbacklist):
    _savedExceptions.append((e_type, e_value, tbacklist))
    if debug.debug() or not guitop.getMainLoop():
        excepthook.printTraceBack(e_type, e_value, tbacklist)
コード例 #6
0
ファイル: thread_enable.py プロジェクト: anilkunwar/OOF2
def query():
    global _enable
    return _enable and guitop.getMainLoop()