forked from cztomczak/cefpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.py
More file actions
19 lines (17 loc) · 753 Bytes
/
utils.py
File metadata and controls
19 lines (17 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Additional and wx specific layer of abstraction for the cefpython
# __author__ = "Greg Kacy <[email protected]>"
#-------------------------------------------------------------------------------
def ExceptHook(excType, excValue, traceObject):
import traceback, os
errorMsg = "\n".join(traceback.format_exception(
excType, excValue, traceObject))
if type(errorMsg) == bytes:
errorMsg = errorMsg.decode(encoding="ascii", errors="replace")
else:
errorMsg = errorMsg.encode("ascii", errors="replace")
errorMsg = errorMsg.decode("ascii", errors="replace")
print("\n"+errorMsg+"\n")
#cefpython.QuitMessageLoop()
#cefpython.Shutdown()
# So that "finally" does not execute.
#os._exit(1)