File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -460,14 +460,22 @@ Connection Objects
460460 Registers *trace_callback * to be called for each SQL statement that is
461461 actually executed by the SQLite backend.
462462
463- The only argument passed to the callback is the statement (as string) that
464- is being executed. The return value of the callback is ignored. Note that
465- the backend does not only run statements passed to the :meth: `Cursor.execute `
466- methods. Other sources include the transaction management of the Python
467- module and the execution of triggers defined in the current database.
463+ The only argument passed to the callback is the statement (as
464+ :class: `str `) that is being executed. The return value of the callback is
465+ ignored. Note that the backend does not only run statements passed to the
466+ :meth: `Cursor.execute ` methods. Other sources include the
467+ :ref: `transaction management <sqlite3-controlling-transactions >` of the
468+ sqlite3 module and the execution of triggers defined in the current
469+ database.
468470
469471 Passing :const: `None ` as *trace_callback * will disable the trace callback.
470472
473+ .. note ::
474+ Exceptions raised in the trace callback are not propagated. As a
475+ development and debugging aid, use
476+ :meth: `~sqlite3.enable_callback_tracebacks ` to enable printing
477+ tracebacks from exceptions raised in the trace callback.
478+
471479 .. versionadded :: 3.3
472480
473481
You can’t perform that action at this time.
0 commit comments