aboutsummaryrefslogtreecommitdiff
path: root/odb/exceptions.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-10-12 17:24:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-10-19 11:38:24 +0200
commit5b0430fdf4617b396e462872d438a663b174a3a8 (patch)
treee89e0cc5b1fdff4e3f49c9c7b7607d2b90108c31 /odb/exceptions.cxx
parent5c705a90d348a2a9428d5121a24eb47d0d73eb39 (diff)
Completion of prepared query support
Diffstat (limited to 'odb/exceptions.cxx')
-rw-r--r--odb/exceptions.cxx48
1 files changed, 43 insertions, 5 deletions
diff --git a/odb/exceptions.cxx b/odb/exceptions.cxx
index d56711c..c49d516 100644
--- a/odb/exceptions.cxx
+++ b/odb/exceptions.cxx
@@ -2,8 +2,6 @@
// copyright : Copyright (c) 2009-2012 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
-#include <sstream>
-
#include <odb/exceptions.hxx>
using namespace std;
@@ -106,13 +104,53 @@ namespace odb
return "no type information";
}
+ prepared_already_cached::
+ prepared_already_cached (const char* name)
+ : name_ (name)
+ {
+ what_ = "prepared query '";
+ what_ += name;
+ what_ += "' is already cached";
+ }
+
+ prepared_already_cached::
+ ~prepared_already_cached () throw ()
+ {
+ }
+
+ const char* prepared_already_cached::
+ what () const throw ()
+ {
+ return what_.c_str ();
+ }
+
+ prepared_type_mismatch::
+ prepared_type_mismatch (const char* name)
+ : name_ (name)
+ {
+ what_ = "type mismatch while looking up prepared query '";
+ what_ += name;
+ what_ += "'";
+ }
+
+ prepared_type_mismatch::
+ ~prepared_type_mismatch () throw ()
+ {
+ }
+
+ const char* prepared_type_mismatch::
+ what () const throw ()
+ {
+ return what_.c_str ();
+ }
+
unknown_schema::
unknown_schema (const std::string& name)
: name_ (name)
{
- ostringstream ostr;
- ostr << "unknown database schema '" << name << "'";
- what_ = ostr.str ();
+ what_ = "unknown database schema '";
+ what_ += name;
+ what_ += "'";
}
unknown_schema::