aboutsummaryrefslogtreecommitdiff
path: root/odb/exceptions.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-13 14:58:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-13 14:58:52 +0200
commitf7bf16d50f6f08c66b1bae35e2dab327d560b0f3 (patch)
treede7e3e7bc63aeba11a3c782b3c55c51b4d6b2001 /odb/exceptions.cxx
parent0634ddb1f04489b8fe26d131ee216dec0a47a28d (diff)
Make odb::exception abstract
Implement what() in concrete exceptions.
Diffstat (limited to 'odb/exceptions.cxx')
-rw-r--r--odb/exceptions.cxx35
1 files changed, 35 insertions, 0 deletions
diff --git a/odb/exceptions.cxx b/odb/exceptions.cxx
index d86657c..b27cc37 100644
--- a/odb/exceptions.cxx
+++ b/odb/exceptions.cxx
@@ -7,4 +7,39 @@
namespace odb
{
+ const char* already_in_transaction::
+ what () const throw ()
+ {
+ return "transaction already in progress in this thread";
+ }
+
+ const char* not_in_transaction::
+ what () const throw ()
+ {
+ return "operation can only be performed in transaction";
+ }
+
+ const char* transaction_already_finilized::
+ what () const throw ()
+ {
+ return "transaction already committed or rolled back";
+ }
+
+ const char* deadlock::
+ what () const throw ()
+ {
+ return "transaction aborted due to deadlock";
+ }
+
+ const char* object_not_persistent::
+ what () const throw ()
+ {
+ return "object not persistent";
+ }
+
+ const char* object_already_persistent::
+ what () const throw ()
+ {
+ return "object already persistent";
+ }
}