From f7bf16d50f6f08c66b1bae35e2dab327d560b0f3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Sep 2010 14:58:52 +0200 Subject: Make odb::exception abstract Implement what() in concrete exceptions. --- odb/exceptions.cxx | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'odb/exceptions.cxx') 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"; + } } -- cgit v1.1