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.hxx | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'odb/exceptions.hxx') diff --git a/odb/exceptions.hxx b/odb/exceptions.hxx index 9e37967..90729fc 100644 --- a/odb/exceptions.hxx +++ b/odb/exceptions.hxx @@ -127,6 +127,46 @@ namespace odb what () const throw (); }; + // Prepared query support exceptions. + // + struct LIBODB_EXPORT prepared_already_cached: exception + { + prepared_already_cached (const char* name); + ~prepared_already_cached () throw (); + + const char* + name () const + { + return name_; + } + + virtual const char* + what () const throw (); + + private: + const char* name_; + std::string what_; + }; + + struct LIBODB_EXPORT prepared_type_mismatch: exception + { + prepared_type_mismatch (const char* name); + ~prepared_type_mismatch () throw (); + + const char* + name () const + { + return name_; + } + + virtual const char* + what () const throw (); + + private: + const char* name_; + std::string what_; + }; + // Schema catalog exceptions. // struct LIBODB_EXPORT unknown_schema: exception -- cgit v1.1