aboutsummaryrefslogtreecommitdiff
path: root/odb/exceptions.hxx
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.hxx
parent4962329eecb716bc2b99810ec1ac4214606fc1e8 (diff)
Add support for embedded schema migration
Diffstat (limited to 'odb/exceptions.hxx')
-rw-r--r--odb/exceptions.hxx22
1 files changed, 21 insertions, 1 deletions
diff --git a/odb/exceptions.hxx b/odb/exceptions.hxx
index e4d8292..3c1ac20 100644
--- a/odb/exceptions.hxx
+++ b/odb/exceptions.hxx
@@ -9,7 +9,7 @@
#include <string>
-#include <odb/forward.hxx> // odb::core
+#include <odb/forward.hxx> // schema_version, odb::core
#include <odb/exception.hxx>
#include <odb/details/export.hxx>
@@ -189,6 +189,25 @@ namespace odb
std::string what_;
};
+ struct LIBODB_EXPORT unknown_schema_version: exception
+ {
+ unknown_schema_version (schema_version);
+ ~unknown_schema_version () throw ();
+
+ schema_version
+ version () const
+ {
+ return version_;
+ }
+
+ virtual const char*
+ what () const throw ();
+
+ private:
+ schema_version version_;
+ std::string what_;
+ };
+
namespace common
{
using odb::null_pointer;
@@ -215,6 +234,7 @@ namespace odb
using odb::no_type_info;
using odb::unknown_schema;
+ using odb::unknown_schema_version;
}
}