Files
cpython-source-deps/docs_src/env/env_set_errcall.so
2017-09-04 13:40:25 -05:00

122 lines
4.4 KiB
Plaintext

m4_comment([$Id: env_set_errcall.so,v 10.39 2006/05/17 20:47:46 bostic Exp $])
ifdef([M4INTERFACE],, [define(M4INTERFACE, dbenv_set_errcall)])
define(M4PAGELOCAL, M4INTERFACE)
include(m4/m4.seealso)
ifelse(M4INTERFACE, dbenv_set_errcall, [dnl
m4_pf_header(m4_ref(dbenv_set_errcall),
ifelse(M4API, C_API, [dnl
void
DB_ENV-__GT__set_errcall(DB_ENV *dbenv, void (*db_errcall_fcn)
(const DB_ENV *dbenv, const char *errpfx, const char *msg));
])
ifelse(M4API, CXX_API, [dnl
void DbEnv::set_errcall(void (*db_errcall_fcn)
(const Dbenv *dbenv, const char *errpfx, const char *msg));
]))],[dnl
m4_pf_header(m4_ref(dbh_set_errcall),
ifelse(M4API, C_API, [dnl
void
DB-__GT__set_errcall(DB *, void (*db_errcall_fcn)
(const DB_ENV *dbenv, const char *errpfx, const char *msg));
])
ifelse(M4API, CXX_API, [dnl
void Db::set_errcall(void (*db_errcall_fcn)
(const DbEnv *dbenv, const char *errpfx, const char *msg));
]))])
define(__error_param, [dnl
ifelse([$1], internal, [dnl
The m4_arg(db_errcall_fcn) parameter is the application-specified error
reporting function. The function takes three parameters:
m4_tagbegin
m4_tag(m4_arg(dbenv), [dnl
The m4_arg(dbenv) parameter is the enclosing database environment.])
m4_tag(m4_arg(errpfx), [dnl
The m4_arg(errpfx) parameter is the prefix string (as previously set by
m4_ref(dbh_set_errpfx) or m4_ref(dbenv_set_errpfx)).])
m4_tag(m4_arg(msg), [dnl
The m4_arg(msg) parameter is the error message string.])
m4_tagend
],[dnl
m4_parambegin
m4_param(dbenv, [dnl
The m4_arg(dbenv) parameter is the enclosing database environment.])
m4_param(errpfx, [dnl
The m4_arg(prefix) parameter is the prefix string (as previously set by
m4_ref(dbh_set_errpfx) or m4_ref(dbenv_set_errpfx)).])
m4_param(msg, [dnl
The m4_arg(msg) parameter is the error message string.])
m4_paramend])])
ifelse(M4API, C_API, [m4_p([dnl
When an error occurs in the m4_db library, a m4_db error or an error
return value is returned by the interface. In some cases, however,
the m4_envvar(errno) value may be insufficient to completely describe
the cause of the error, especially during initial application debugging.])
m4_p([dnl
The m4_ref(dbenv_set_errcall) and m4_refT(dbh_set_errcall)s are used to
enhance the mechanism for reporting error messages to the application.
In some cases, when an error occurs, m4_db will call
m4_arg(db_errcall_fcn) with additional error information. It is up to
the m4_arg(db_errcall_fcn) function to display the error message in an
appropriate manner.])
m4_p([dnl
Setting m4_arg(db_errcall_fcn) to NULL unconfigures the callback interface.])
m4_p([dnl
Alternatively, you can use the m4_ref(dbh_set_errfile) or
m4_refT(dbenv_set_errfile)s to display the additional information via
a C library FILE *.])])
ifelse(M4API, CXX_API, [dnl
When an error occurs in the m4_db library, an exception is thrown or an
error return value is returned by the interface. In some cases,
however, the m4_envvar(errno) value may be insufficient to completely
describe the cause of the error, especially during initial application
debugging.
m4_p([dnl
The m4_ref(dbenv_set_errcall) and m4_refT(dbh_set_errcall)s are used to
enhance the mechanism for reporting error messages to the application.
In some cases, when an error occurs, m4_db will call
m4_arg(db_errcall_fcn) with additional error information. It is up to
the m4_arg(db_errcall_fcn) function to display the error message in an
appropriate manner.])
m4_p([dnl
Setting m4_arg(db_errcall_fcn) to NULL unconfigures the callback interface.])
m4_p([dnl
Alternatively, you can use the m4_ref(dbenv_set_error_stream) and
m4_refT(dbh_set_error_stream)s to display the additional information via
an output stream, or the m4_ref(dbh_set_errfile) or
m4_refT(dbenv_set_errfile)s to display the additional information via a C
library FILE *. You should not mix these approaches.])])
m4_p([dnl
This error-logging enhancement does not slow performance or significantly
increase application size, and may be run during normal operation as well
as during application debugging.])
ifelse(M4INTERFACE, dbh_set_errcall, [dnl
m4_really_dbenv(dbh_set_errcall, dbenv_set_errcall)])
ifelse(M4INTERFACE, dbh_set_errcall,
[m4_scope_dbh(M4INTERFACE)], [m4_scope_dbenv(M4INTERFACE)])
m4_when_any(M4INTERFACE)
m4_parambegin
m4_param(db_errcall_fcn, [dnl
__error_param(internal)
m4_not_reentrant])
m4_paramend
ifelse(M4INTERFACE, dbenv_set_errcall, [m4_seealso(DbEnv)], [m4_seealso(Db)])
m4_page_footer