DB_ENV->err API Ref

#include <db.h>

void DB_ENV->err(DB_ENV *dbenv, int error, const char *fmt, ...);

void DB_ENV->errx(DB_ENV *dbenv, const char *fmt, ...);


Description: DB_ENV->err

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

The DB->err and DB_ENV->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 DB_ENV->errx methods are the same as the DB->err and DB_ENV->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 DB_ENV->set_errcall), that function is called with two parameters: any prefix string specified (see DB->set_errpfx and DB_ENV->set_errpfx) and the error message.

If a C library FILE * has been set (see DB->set_errfile and DB_ENV->set_errfile), the error message is written to that output 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 DB_ENV
See Also Database Environments and Related Methods

APIRef

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