+5
-2
lines changedFilter options
+5
-2
lines changed Original file line number Diff line number Diff line change
@@ -19,8 +19,6 @@ def ExceptHook(exc_type, exc_value, exc_trace):
19
19
and exit application immediately by ignoring "finally" (_exit()).
20
20
"""
21
21
print("[CEF Python] ExceptHook: catched exception, will shutdown CEF")
22
-
QuitMessageLoop()
23
-
Shutdown()
24
22
msg = "".join(traceback.format_exception(exc_type, exc_value,
25
23
exc_trace))
26
24
error_file = GetAppPath("error.log")
@@ -40,6 +38,11 @@ def ExceptHook(exc_type, exc_value, exc_trace):
40
38
msg = msg.encode("ascii", errors="replace")
41
39
msg = msg.decode("ascii", errors="replace")
42
40
print("\n"+msg)
41
+
# There is a strange bug on Mac. Sometimes except message is not
42
+
# printed if QuitMessageLoop and Shutdown were called before the print
43
+
# message above.
44
+
QuitMessageLoop()
45
+
Shutdown()
43
46
# noinspection PyProtectedMember
44
47
os._exit(1)
45
48
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4