Berkeley DB: DbEnv::set_error_model
Полезная информация

DbEnv::set_error_model


ErrorReturn };
void DbEnv::set_error_model(ErrorModel);
#include <db_cxx.h>

enum ErrorModel { Exception

Description

Most methods in the Berkeley DB classes return an int but also throw an DbException object. This allows for two different error behaviors, that are known as error models. The errorModel argument is one of the following enumeration values:

DbEnv::Exception
Throw an exception whenever a serious error occurs. This generally allows for cleaner logic for transaction processing, as a try block can surround a single transaction. This is the default error model.

DbEnv::ErrorReturn
Do not throw exceptions, instead each individual function returns an error code on error.

Class

DbEnv

See Also

DbEnv::appinit, DbEnv::appexit, DbEnv::version, DbEnv::get_lg_info, DbEnv::get_lk_info, DbEnv::get_mp_info, DbEnv::get_tx_info, dbenv_set_data_dir, DbEnv::set_errcall, DbEnv::set_errfile, DbEnv::set_error_model, DbEnv::set_error_stream, DbEnv::set_errpfx, DbEnv::set_lg_max, DbEnv::set_lk_conflicts, DbEnv::set_lk_detect, DbEnv::set_lk_modes, DbEnv::set_lorder, DbEnv::set_mp_mmapsize, DbEnv::set_mp_size, DbEnv::set_tx_max, DbEnv::set_tx_recover and DbEnv::set_verbose.