

def ExceptHook(excType, excValue, traceObject):
    import traceback, os, time, codecs
    errorMsg = '\n'.join(traceback.format_exception(excType, excValue, traceObject))
    errorFile = GetApplicationPath('error.log')
    try:
        appEncoding = cefpython.g_applicationSettings['string_encoding']
    except:
        appEncoding = 'utf-8'
    if (type(traceObject) == bytes):
        errorMsg = errorMsg.decode(encoding=appEncoding, errors='replace')
    try:
        with codecs.open(errorFile, mode='a', encoding=appEncoding) as fp:
            fp.write(('\n[%s] %s\n' % (time.strftime('%Y-%m-%d %H:%M:%S'), errorMsg)))
    except:
        print(('[pyqt.py] WARNING: failed writing to error file: %s' % errorFile))
    errorMsg = errorMsg.encode('ascii', errors='replace')
    errorMsg = errorMsg.decode('ascii', errors='replace')
    print((('\n' + errorMsg) + '\n'))
    cefpython.QuitMessageLoop()
    cefpython.Shutdown()
    os._exit(1)

dataset/ETHPy150Open cztomczak/cefpython/cefpython/cef3/linux/binaries_32bit/pyqt.py ExceptHook/VarMisuse@75/110 `errorMsg`->`traceObject`