mirror of
https://github.com/MariaDB/server.git
synced 2025-11-30 05:23:50 +03:00
add DbEnv::set_errcall closes #228
git-svn-id: file:///svn/tokudb@1441 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
@@ -109,3 +109,13 @@ void DbEnv::err(int error, const char *fmt, ...) {
|
||||
void DbEnv::set_errfile(FILE *errfile) {
|
||||
the_env->set_errfile(the_env, errfile);
|
||||
}
|
||||
|
||||
extern "C" void toku_db_env_errcall_c(DB_ENV *dbenv_c, const char *errpfx, const char *msg) {
|
||||
DbEnv *dbenv = (DbEnv *) dbenv_c->api1_internal;
|
||||
dbenv->errcall(dbenv, errpfx, msg);
|
||||
}
|
||||
|
||||
void DbEnv::set_errcall(void (*db_errcall_fcn)(const DbEnv *, const char *, const char *)) {
|
||||
errcall = db_errcall_fcn;
|
||||
the_env->set_errcall(the_env, toku_db_env_errcall_c);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user