From dac72baef46897b80fc98632cef182fb266a5d60 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 21 Mar 2011 17:24:35 +0200 Subject: Add base SQLite database classes --- odb/sqlite/exceptions.cxx | 56 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 odb/sqlite/exceptions.cxx (limited to 'odb/sqlite/exceptions.cxx') diff --git a/odb/sqlite/exceptions.cxx b/odb/sqlite/exceptions.cxx new file mode 100644 index 0000000..6801665 --- /dev/null +++ b/odb/sqlite/exceptions.cxx @@ -0,0 +1,56 @@ +// file : odb/sqlite/exceptions.cxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#include + +using namespace std; + +namespace odb +{ + namespace sqlite + { + // + // database_exception + // + + database_exception:: + ~database_exception () throw () + { + } + + database_exception:: + database_exception (int e, int ee, const string& m) + : error_ (e), extended_error_ (ee), message_ (m) + { + } + + const char* database_exception:: + what () const throw () + { + return message_.c_str (); + } + + // + // cli_exception + // + + cli_exception:: + cli_exception (const std::string& what) + : what_ (what) + { + } + + cli_exception:: + ~cli_exception () throw () + { + } + + const char* cli_exception:: + what () const throw () + { + return what_.c_str (); + } + } +} -- cgit v1.1