Whole document tree

Whole document tree

Berkeley DB: DB->set_errpfx



#include <db.h>

void DB->set_errpfx(DB *db, const char *errpfx);


Set the prefix string that appears before error messages issued by Berkeley DB.

The DB->set_errpfx function does not copy the memory referenced by the errpfx argument, rather, it maintains a reference to it. This allows applications to modify the error message prefix at any time, without repeatedly calling DB->set_errpfx, but means that the memory must be maintained until the handle is closed.

For DB handles opened inside of Berkeley DB environments, calling the DB->set_errpfx function affects the entire environment and is equivalent to calling the DBENV->set_errpfx function.

The DB->set_errpfx interface may be used to configure Berkeley DB at any time during the life of the application.

See Also

DBENV->close, db_env_create, DBENV->open, DBENV->remove, DBENV->err, db_strerror, db_version, DBENV->set_cachesize, DBENV->set_errcall, DBENV->set_errfile, DBENV->set_errpfx, DBENV->set_flags, DBENV->set_mutexlocks, DBENV->set_paniccall, and DBENV->set_verbose.


Copyright Sleepycat Software