1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-30 05:23:50 +03:00
Propagate refactored error handling to C++ API.

git-svn-id: file:///svn/tokudb@2308 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Vincenzo Liberatore
2008-02-15 21:36:19 +00:00
parent 4565645290
commit 97e1ef272f

View File

@@ -1,6 +1,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include "../newbrt/brttypes.h"
#include <db_cxx.h> #include <db_cxx.h>
DbEnv::DbEnv (u_int32_t flags) DbEnv::DbEnv (u_int32_t flags)
@@ -100,13 +101,17 @@ int DbEnv::maybe_throw_error(int err) throw (DbException) {
} }
extern "C" { extern "C" {
void toku_do_error_all_cases(const DB_ENV * env, int error, int, int, const char *fmt, va_list ap); void toku_ydb_error_all_cases(const DB_ENV * env,
int error,
BOOL include_stderrstring,
BOOL use_stderr_if_nothing_else,
const char *fmt, va_list ap);
}; };
void DbEnv::err(int error, const char *fmt, ...) { void DbEnv::err(int error, const char *fmt, ...) {
va_list ap; va_list ap;
va_start(ap, fmt); va_start(ap, fmt);
toku_do_error_all_cases(the_env, error, 1, 1, fmt, ap); toku_ydb_error_all_cases(the_env, error, TRUE, TRUE, fmt, ap);
va_end(ap); va_end(ap);
} }