diff options
Diffstat (limited to 'odb/mysql/exceptions.cxx')
-rw-r--r-- | odb/mysql/exceptions.cxx | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/odb/mysql/exceptions.cxx b/odb/mysql/exceptions.cxx index d87b6c2..dd9e199 100644 --- a/odb/mysql/exceptions.cxx +++ b/odb/mysql/exceptions.cxx @@ -3,10 +3,8 @@ // copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -#include <new> // std::bad_alloc #include <sstream> -#include <odb/mysql/mysql.hxx> #include <odb/mysql/exceptions.hxx> using namespace std; @@ -25,47 +23,12 @@ namespace odb } database_exception:: - database_exception (MYSQL* h) - : error_ (mysql_errno (h)) - { - if (error_ == CR_OUT_OF_MEMORY) - throw bad_alloc (); - - sqlstate_ = mysql_sqlstate (h); - message_ = mysql_error (h); - - init (); - } - - database_exception:: - database_exception (MYSQL_STMT* h) - : error_ (mysql_stmt_errno (h)) - { - if (error_ == CR_OUT_OF_MEMORY) - throw bad_alloc (); - - sqlstate_ = mysql_stmt_sqlstate (h); - message_ = mysql_stmt_error (h); - - init (); - } - - database_exception:: database_exception (unsigned int e, const string& s, const string& m) : error_ (e) { - if (error_ == CR_OUT_OF_MEMORY) - throw bad_alloc (); - sqlstate_ = s; message_ = m; - init (); - } - - void database_exception:: - init () - { ostringstream ostr; ostr << error_ << " (" << sqlstate_ << "): " << message_; what_ = ostr.str (); |