Db::set_errpfx |
#include <db_cxx.h>void Db::set_errpfx(const char *errpfx);
Set the prefix string that appears before error messages issued by Berkeley DB.
The Db::set_errpfx method 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 method affects the entire environment and is equivalent to calling the DbEnv::set_errpfx method.
The Db::set_errpfx interface may be used to configure Berkeley DB at any time during the life of the application.