From 5b0430fdf4617b396e462872d438a663b174a3a8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 12 Oct 2012 17:24:44 +0200 Subject: Completion of prepared query support --- odb/exceptions.cxx | 48 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 5 deletions(-) (limited to 'odb/exceptions.cxx') 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 - #include 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:: -- cgit v1.1