aboutsummaryrefslogtreecommitdiff
path: root/odb/exceptions.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-03-01 11:56:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-03-01 11:56:33 +0200
commitbb2358220adfe274b54d9b155205b60ddfe625c6 (patch)
treef8822c33ff25a0a9058ce92ce3a8716343a399f0 /odb/exceptions.cxx
parent1233c11bf05cc3a039afa548faf06f3610f24269 (diff)
Add support for embedded database schemas
New options: --schema-format, --default-schema. New example: schema/embedded.
Diffstat (limited to 'odb/exceptions.cxx')
-rw-r--r--odb/exceptions.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/odb/exceptions.cxx b/odb/exceptions.cxx
index 1d4be70..b79f189 100644
--- a/odb/exceptions.cxx
+++ b/odb/exceptions.cxx
@@ -3,8 +3,12 @@
// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
+#include <sstream>
+
#include <odb/exceptions.hxx>
+using namespace std;
+
namespace odb
{
const char* null_pointer::
@@ -84,4 +88,24 @@ namespace odb
{
return "object already persistent";
}
+
+ unknown_schema::
+ unknown_schema (const std::string& name)
+ : name_ (name)
+ {
+ ostringstream ostr;
+ ostr << "unknown database schema '" << name << "'";
+ what_ = ostr.str ();
+ }
+
+ unknown_schema::
+ ~unknown_schema () throw ()
+ {
+ }
+
+ const char* unknown_schema::
+ what () const throw ()
+ {
+ return what_.c_str ();
+ }
}