diff options
author | unknown <tomas@mc05.(none)> | 2004-05-05 11:29:56 +0200 |
---|---|---|
committer | unknown <tomas@mc05.(none)> | 2004-05-05 11:29:56 +0200 |
commit | 9f76f43cb9aceb160fa6faea0fd8c2ea91ce761e (patch) | |
tree | 89ab1f0c13b8d76de8b53c55dfa0716b06f6d02b /ndb/src/ndbapi/NdbErrorOut.cpp | |
parent | 93448ea564c975db7bfa0a0139b789c72813f924 (diff) | |
download | mariadb-git-9f76f43cb9aceb160fa6faea0fd8c2ea91ce761e.tar.gz |
Restructure of ndb error
ndb/src/kernel/blocks/backup/restore/Makefile:
better make
Diffstat (limited to 'ndb/src/ndbapi/NdbErrorOut.cpp')
-rw-r--r-- | ndb/src/ndbapi/NdbErrorOut.cpp | 65 |
1 files changed, 3 insertions, 62 deletions
diff --git a/ndb/src/ndbapi/NdbErrorOut.cpp b/ndb/src/ndbapi/NdbErrorOut.cpp index 286f8216bf7..01d5f63599b 100644 --- a/ndb/src/ndbapi/NdbErrorOut.cpp +++ b/ndb/src/ndbapi/NdbErrorOut.cpp @@ -15,7 +15,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <NdbError.hpp> #include <NdbStdio.h> #include <stdarg.h> @@ -23,10 +22,7 @@ #include <NdbOut.hpp> -const char *ndberror_status_message(const NdbError::Status & status); -const char *ndberror_classification_message(const NdbError::Classification & classification); -int ndb_error_string(int err_no, char *str, size_t size); -void ndberror_update(const NdbError & _err); +#include <NdbError.hpp> /** * operators @@ -42,66 +38,11 @@ operator<<(NdbOut & out, const NdbError & error){ NdbOut & operator<<(NdbOut & out, const NdbError::Status & status){ - return out << ndberror_status_message(status); + return out << ndberror_status_message((ndberror_status)status); } NdbOut & operator<<(NdbOut & out, const NdbError::Classification & classification){ - return out << ndberror_classification_message(classification); -} - -/****************************************************** - * - */ -#include "NdbImpl.hpp" -#include "NdbDictionaryImpl.hpp" -#include <NdbSchemaCon.hpp> -#include <NdbOperation.hpp> -#include <NdbConnection.hpp> - - -const -NdbError & -Ndb::getNdbError(int code){ - theError.code = code; - ndberror_update(theError); - return theError; + return out << ndberror_classification_message((ndberror_classification)classification); } -const -NdbError & -Ndb::getNdbError() const { - ndberror_update(theError); - return theError; -} - -const -NdbError & -NdbDictionaryImpl::getNdbError() const { - ndberror_update(m_error); - return m_error; -} - -const -NdbError & -NdbConnection::getNdbError() const { - ndberror_update(theError); - return theError; -} - -const -NdbError & -NdbOperation::getNdbError() const { - ndberror_update(theError); - return theError; -} - -const -NdbError & -NdbSchemaCon::getNdbError() const { - ndberror_update(theError); - return theError; -} - - - |