From 5e6412b3c5a4db0a59f35c6fc46f456935ad04db Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 17 Jan 2011 14:29:55 +0200 Subject: Document new exceptions --- doc/manual.xhtml | 51 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file 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
 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
 }
   
-

The first four exceptions (already_in_transaction, +

The null_pointer exception is thrown when a + pointer to a persistent object declared non-NULL + with the db not_null pragma has the NULL + value. See Chapter Y, "Relationships" for details.

+ +

The next three exceptions (already_in_transaction, not_in_transaction, - transaction_already_finalized, and - deadlock) are thrown by the + transaction_already_finalized) are thrown by the odb::transaction class and are discussed in Section 3.4, "Transactions".

+

The next three exceptions (already_in_session, + not_in_session, and + const_object) are thrown by the + odb::session class and are discussed + in Chapter Q, "Session".

+ +

The deadlock exception is thrown when a transaction + deadlock is detected by the database system. It can thrown by any + database function. See Section 3.4, "Transactions" + for details.

+

The object_already_persistent exception is thrown by the persist() database function. See Section 3.5, "Making Objects Persistent" -- cgit v1.1