diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-13 14:58:52 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-13 14:58:52 +0200 |
commit | f7bf16d50f6f08c66b1bae35e2dab327d560b0f3 (patch) | |
tree | de7e3e7bc63aeba11a3c782b3c55c51b4d6b2001 /odb/exceptions.cxx | |
parent | 0634ddb1f04489b8fe26d131ee216dec0a47a28d (diff) |
Make odb::exception abstract
Implement what() in concrete exceptions.
Diffstat (limited to 'odb/exceptions.cxx')
-rw-r--r-- | odb/exceptions.cxx | 35 |
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"; + } } |