Skip to content

Commit 7748208

Browse files
authored
Update Tutorial.md
ExceptHook update
1 parent 2de75b7 commit 7748208

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

docs/Tutorial.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ Google website. Let's analyze the code from that example:
6969
1. `from cefpython3 import cefpython as cef` - Import the cefpython
7070
module and make a short "cef" alias
7171
2. `sys.excepthook = cef.ExceptHook` - Overwrite Python's default
72-
exception handler so that all CEF sub-processes are terminated
73-
when Python exception occurs. To understand this better read the
74-
"Architecture" and "Handling Python exceptions" sections
75-
further down in this Tutorial.
72+
exception handler so that all CEF sub-processes are reliably
73+
terminated when Python exception occurs. To understand this
74+
better read the "Architecture" and "Handling Python exceptions"
75+
sections further down in this Tutorial.
7676
3. `cef.Initialize()` - Initialize CEF. This function must be called
7777
somewhere in the beginning of your code. It must be called before
7878
any application window is created. It must be called only once
@@ -140,9 +140,9 @@ special handling. When Python exception occurs then main process
140140
is terminated. For CEF this means that the Browser process is
141141
terminated, however there may still be running CEF sub-processes
142142
like Renderer process, GPU process, etc. To terminate these
143-
sub-processes cef.[Shutdown](../api/cefpython.md#shutdown)
143+
sub-processes cleanly cef.[Shutdown](../api/cefpython.md#shutdown)
144144
must be called and if running CEF message loop then it must be
145-
stopped first. In all CEF Python examples you can find such
145+
stopped first. In most of CEF Python examples you can find such
146146
a line that overwrites the default exception handler in Python:
147147

148148
```python
@@ -160,7 +160,8 @@ The cef.ExceptHook helper function does the following:
160160
which exits the process with status 1, without calling
161161
cleanup handlers, flushing stdio buffers, etc.
162162

163-
See CEF Python's ExceptHook source code in src/[helpers.pyx](../src/helpers.pyx).
163+
If you would like to modify `ExceptHook` behavior, see its source code
164+
in src/[helpers.pyx](../src/helpers.pyx) file.
164165

165166

166167
## Settings

0 commit comments

Comments
 (0)