aboutsummaryrefslogtreecommitdiff
path: root/odb/exceptions.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-04-09 16:17:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-04-09 16:17:26 +0200
commit287a41287ed26bcf481f087680cad56ed5ef9865 (patch)
treea139f2da973f2e6576d2673e9e096a4e4ab12e6f /odb/exceptions.cxx
parent4962329eecb716bc2b99810ec1ac4214606fc1e8 (diff)
Add support for embedded schema migration
Diffstat (limited to 'odb/exceptions.cxx')
-rw-r--r--odb/exceptions.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/odb/exceptions.cxx b/odb/exceptions.cxx
index 9502f96..1ee17e5 100644
--- a/odb/exceptions.cxx
+++ b/odb/exceptions.cxx
@@ -2,6 +2,7 @@
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
+#include <sstream>
#include <odb/exceptions.hxx>
using namespace std;
@@ -163,4 +164,25 @@ namespace odb
{
return what_.c_str ();
}
+
+ unknown_schema_version::
+ unknown_schema_version (schema_version v)
+ : version_ (v)
+ {
+ ostringstream os;
+ os << v;
+ what_ = "unknown database schema version ";
+ what_ += os.str ();
+ }
+
+ unknown_schema_version::
+ ~unknown_schema_version () throw ()
+ {
+ }
+
+ const char* unknown_schema_version::
+ what () const throw ()
+ {
+ return what_.c_str ();
+ }
}