Skip to content

Commit

Permalink
Document that hooks must not raise / propagate exceptions.
Browse files Browse the repository at this point in the history
Closes #49.
  • Loading branch information
tseaver committed Jun 19, 2017
1 parent 43deb5d commit ab59dc2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/hooks.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
Hooking the Transaction Machinery
=================================

The :mod:`transaction` machinery allows application developers to register
two different groups of callbacks to be called, one group before
committing the transaction and one group after.

These hooks are **not** designed to be used as replacements for the
two-phase commit machinery defined by a resource manager (see
:doc:`resourcemanager`). In particular, hook functions **must not** raise
or propagate exceptions.

.. warning::

Hook functions which *do* raise or propagate exceptions will leave the
application in an undefined state.

The :meth:`addBeforeCommitHook` Method
--------------------------------------

Expand Down

0 comments on commit ab59dc2

Please sign in to comment.