diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-01-17 14:29:55 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-01-17 14:29:55 +0200 |
commit | 5e6412b3c5a4db0a59f35c6fc46f456935ad04db (patch) | |
tree | d14a5c7ad59a53ef5ae41aeb15e082d96d95d082 | |
parent | 662d76ebb86b06c6aa754b0c52c07efbde80f943 (diff) |
Document new exceptions
-rw-r--r-- | doc/manual.xhtml | 51 |
1 files changed, 48 insertions, 3 deletions
diff --git a/doc/manual.xhtml b/doc/manual.xhtml index 95c0ddc..a734c04 100644 --- a/doc/manual.xhtml +++ b/doc/manual.xhtml @@ -2379,6 +2379,14 @@ namespace odb <pre class="c++"> namespace odb { + struct null_pointer: odb::exception + { + virtual const char* + what () const throw (); + }; + + // Transaction exceptions. + // struct already_in_transaction: odb::exception { virtual const char* @@ -2397,6 +2405,28 @@ namespace odb what () const throw (); }; + // Session exceptions. + // + struct already_in_session: odb::exception + { + virtual const char* + what () const throw (); + }; + + struct not_in_session: odb::exception + { + virtual const char* + what () const throw (); + }; + + struct const_object: odb::exception + { + virtual const char* + what () const throw (); + }; + + // Database operations exceptions. + // struct deadlock: odb::exception { virtual const char* @@ -2427,13 +2457,28 @@ namespace odb } </pre> - <p>The first four exceptions (<code>already_in_transaction</code>, + <p>The <code>null_pointer</code> exception is thrown when a + pointer to a persistent object declared non-<code>NULL</code> + with the <code>db not_null</code> pragma has the <code>NULL</code> + value. See <a href="#Y">Chapter Y, "Relationships"</a> for details.</p> + + <p>The next three exceptions (<code>already_in_transaction</code>, <code>not_in_transaction</code>, - <code>transaction_already_finalized</code>, and - <code>deadlock</code>) are thrown by the + <code>transaction_already_finalized</code>) are thrown by the <code>odb::transaction</code> class and are discussed in <a href="#3.4">Section 3.4, "Transactions"</a>.</p> + <p>The next three exceptions (<code>already_in_session</code>, + <code>not_in_session</code>, and + <code>const_object</code>) are thrown by the + <code>odb::session</code> class and are discussed + in <a href="#Q">Chapter Q, "Session"</a>.</p> + + <p>The <code>deadlock</code> exception is thrown when a transaction + deadlock is detected by the database system. It can thrown by any + database function. See <a href="#3.4">Section 3.4, "Transactions"</a> + for details.</p> + <p>The <code>object_already_persistent</code> exception is thrown by the <code>persist()</code> database function. See <a href="#3.5">Section 3.5, "Making Objects Persistent"</a> |