File tree 1 file changed +8
-14
lines changed
1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -138,20 +138,14 @@ class CallbackRegistry:
138
138
Parameters
139
139
----------
140
140
exception_handler : callable, optional
141
- If provided must have signature ::
142
-
143
- def handler(exc: Exception) -> None:
144
-
145
- If not None this function will be called with any `Exception`
146
- subclass raised by the callbacks in `CallbackRegistry.process`.
147
- The handler may either consume the exception or re-raise.
148
-
149
- The callable must be pickle-able.
150
-
151
- The default handler is ::
152
-
153
- def h(exc):
154
- traceback.print_exc()
141
+ If not None, *exception_handler* must be a function that takes an
142
+ `Exception` as single parameter. It gets called with any `Exception`
143
+ raised by the callbacks during `CallbackRegistry.process`, and may
144
+ either re-raise the exception or handle it in another manner.
145
+
146
+ The default handler prints the exception (with `traceback.print_exc`) if
147
+ an interactive event loop is running; it re-raises the exception if no
148
+ interactive event loop is running.
155
149
"""
156
150
157
151
# We maintain two mappings:
You can’t perform that action at this time.
0 commit comments