diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-26 11:43:10 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-26 11:43:10 +0200 |
commit | f85d634ac895a6ad937d8bc0861cc483d07da1cb (patch) | |
tree | a165a322380ae69c21bf2e3c48e1c6738d971a76 /odb/generator.cxx | |
parent | 1bcf16e4a89a09346813c1c47e75da99f74a65fe (diff) |
Add database name to changelog
Diffstat (limited to 'odb/generator.cxx')
-rw-r--r-- | odb/generator.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/odb/generator.cxx b/odb/generator.cxx index 1ca094f..a4e1303 100644 --- a/odb/generator.cxx +++ b/odb/generator.cxx @@ -251,6 +251,14 @@ generate (options const& ops, xml::parser p (is, in_log_path.string ()); old_changelog.reset (new (shared) sema_rel::changelog (p)); + + if (old_changelog->database () != db.string ()) + { + cerr << in_log_path << ": error: wrong database '" << + old_changelog->database () << "', expected '" << db << + "'" << endl; + throw generator::failed (); + } } catch (const ios_base::failure& e) { @@ -270,7 +278,7 @@ generate (options const& ops, old_changelog.get (), in_log_path.string (), out_log_path.string (), - ops.init_changelog ()); + ops); } // Output files. |