diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-21 17:24:35 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-21 17:24:35 +0200 |
commit | dac72baef46897b80fc98632cef182fb266a5d60 (patch) | |
tree | a90f40a5fac59456c6fecf3d31a008c5a061b955 /odb/sqlite/exceptions.cxx | |
parent | 3af997a875e439e71754fddb67fd60de9f60307b (diff) |
Add base SQLite database classes
Diffstat (limited to 'odb/sqlite/exceptions.cxx')
-rw-r--r-- | odb/sqlite/exceptions.cxx | 56 |
1 files changed, 56 insertions, 0 deletions
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 <boris@codesynthesis.com> +// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#include <odb/sqlite/exceptions.hxx> + +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 (); + } + } +} |