aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/tracer/exceptions.cxx31
-rw-r--r--odb/tracer/exceptions.hxx31
-rw-r--r--odb/tracer/makefile2
3 files changed, 63 insertions, 1 deletions
diff --git a/odb/tracer/exceptions.cxx b/odb/tracer/exceptions.cxx
new file mode 100644
index 0000000..14977cc
--- /dev/null
+++ b/odb/tracer/exceptions.cxx
@@ -0,0 +1,31 @@
+// file : odb/tracer/exceptions.cxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#include <odb/tracer/exceptions.hxx>
+
+using namespace std;
+
+namespace odb
+{
+ namespace tracer
+ {
+ database_exception::
+ ~database_exception () throw ()
+ {
+ }
+
+ database_exception::
+ database_exception (const string& what)
+ : what_ (what)
+ {
+ }
+
+ char const* database_exception::
+ what () const throw ()
+ {
+ return what_.c_str ();
+ }
+ }
+}
diff --git a/odb/tracer/exceptions.hxx b/odb/tracer/exceptions.hxx
new file mode 100644
index 0000000..7a1dc9f
--- /dev/null
+++ b/odb/tracer/exceptions.hxx
@@ -0,0 +1,31 @@
+// file : odb/tracer/exceptions.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_TRACER_EXCEPTIONS_HXX
+#define ODB_TRACER_EXCEPTIONS_HXX
+
+#include <string>
+
+#include <odb/exceptions.hxx>
+
+namespace odb
+{
+ namespace tracer
+ {
+ struct database_exception: odb::database_exception
+ {
+ database_exception (const std::string&);
+ ~database_exception () throw ();
+
+ virtual char const*
+ what () const throw ();
+
+ private:
+ std::string what_;
+ };
+ }
+}
+
+#endif // ODB_TRACER_EXCEPTIONS_HXX
diff --git a/odb/tracer/makefile b/odb/tracer/makefile
index aacde61..1ab1487 100644
--- a/odb/tracer/makefile
+++ b/odb/tracer/makefile
@@ -5,7 +5,7 @@
include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-cxx_tun := database.cxx transaction.cxx transaction-impl.cxx
+cxx_tun := exceptions.cxx database.cxx transaction.cxx transaction-impl.cxx
cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o))
cxx_od := $(cxx_obj:.o=.o.d)