DbEnv::err API Ref

#include <db_cxx.h>

DbEnv::err(int error, const char *fmt, ...);

DbEnv::errx(const char *fmt, ...);


Description: DbEnv::err

The DbEnv::err, DbEnv::errx, Db::err and Db::errx methods provide error-messaging functionality for applications written using the Berkeley DB library.

The Db::err and DbEnv::err methods constructs an error message consisting of the following elements:


An optional prefix string An optional printf-style message A separator A standard error string

The Db::errx and DbEnv::errx methods are the same as the Db::err and DbEnv::err methods, except they do not append the final separator characters and standard error string to the error message.

This constructed error message is then handled as follows:

If an error callback function has been set (see Db::set_errcall and DbEnv::set_errcall), that function is called with two parameters: any prefix string specified (see Db::set_errpfx and DbEnv::set_errpfx) and the error message.

If a C library FILE * has been set (see Db::set_errfile and DbEnv::set_errfile), the error message is written to that output stream.

If a C++ ostream has been set (see DbEnv::set_error_stream and Db::set_error_stream), the error message is written to that stream.

If none of these output options has been configured, the error message is written to stderr, the standard error output stream.

Parameters
error fmt


Class DbEnv
See Also Database Environments and Related Methods

APIRef

Copyright (c) 1996,2008 Oracle. All rights reserved.