DB->err()

#include <db.h>

void
DB->err(DB *db, int error, const char *fmt, ...);

void
DB->errx(DB *db, const char *fmt, ...);  

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 construct an error message consisting of the following elements:

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:

Note

The total length of the message written by this method, including the prefix string, can be no longer than 4096.

Parameters

error

The error parameter is the error value for which the DB_ENV->err() and DB->err() methods will display an explanatory string.

fmt

The fmt parameter is an optional printf-style message to display.

Class

DB

See Also

Database and Related Methods