DB->set_errpfx

APIRef

#include <db.h>

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

Description

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

The DB->set_errpfx and DB_ENV->set_errpfx functions do not copy the memory to which the errpfx argument refers; rather, they maintain a reference to it. Although this allows applications to modify the error message prefix at any time (without repeatedly calling the interfaces), it means 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 DB_ENV->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

db_create, DB->associate, DB->close, DB->cursor, DB->del, DB->err, DB->errx DB->fd, DB->get, DB->pget, DB->get_byteswapped, DB->get_type, DB->join, DB->key_range, DB->open, DB->put, DB->remove, DB->rename, DB->set_alloc, DB->set_append_recno, DB->set_bt_compare, DB->set_bt_minkey, DB->set_bt_prefix, DB->set_cachesize, DB->set_dup_compare, DB->set_errcall, DB->set_errfile, DB->set_errpfx, DB->set_feedback, DB->set_flags, DB->set_h_ffactor, DB->set_h_hash, DB->set_h_nelem, DB->set_lorder, DB->set_pagesize, DB->set_paniccall, DB->set_q_extentsize, DB->set_re_delim, DB->set_re_len, DB->set_re_pad, DB->set_re_source, DB->stat, DB->sync, DB->truncate, DB->upgrade, and DB->verify.

APIRef

Copyright Sleepycat Software