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

71 lines
2.5 KiB
Plaintext

m4_comment([$Id: env_set_error_stream.so,v 10.30 2006/02/10 22:54:59 bostic Exp $])
ifdef([M4INTERFACE],, [define(M4INTERFACE, dbenv_set_error_stream)])
define(M4PAGELOCAL, M4INTERFACE)
include(m4/m4.seealso)
ifelse(M4INTERFACE, dbenv_set_error_stream, [dnl
m4_pf_header(m4_ref(dbenv_set_error_stream),
ifelse(M4API, CXX_API, [dnl
void DbEnv::set_error_stream(class ostream*);
]))],[dnl
m4_pf_header(m4_ref(dbh_set_error_stream),
ifelse(M4API, CXX_API, [dnl
void Db::set_error_stream(class ostream*);
]))])
m4_p([dnl
When an error occurs in the m4_db library, an exception is thrown or an
m4_envvar(errno) 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_error_stream) and m4_refT(dbh_set_error_stream)s
are used to enhance the mechanism for reporting error messages to the
application by setting the C++ ostream used for displaying additional
m4_db error messages. In some cases, when an error occurs, m4_db will
output an additional error message to the specified stream.])
m4_p([dnl
The error message will consist of the prefix string and a colon
("m4_bold(:)") (if a prefix string was previously specified using
m4_ref(dbenv_set_errpfx)), an error string, and a trailing
m4_htmlquote(newline) character.])
m4_p([dnl
Setting m4_arg(stream) to NULL unconfigures the interface.])
m4_p([dnl
Alternatively, you can use the m4_ref(dbenv_set_errfile) and
m4_refT(dbh_set_errfile)s to display the additional information via a C
library FILE *, or the m4_ref(dbenv_set_errcall) and
m4_refT(dbh_set_errcall)s to capture the additional error information
in a way that does not use either output streams or C library FILE *'s.
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_error_stream, [dnl
m4_really_dbenv(dbh_set_error_stream, dbenv_set_error_stream)])
ifelse(M4INTERFACE, dbh_set_error_stream,
[m4_scope_dbh(M4INTERFACE)], [m4_scope_dbenv(M4INTERFACE)])
m4_when_any(M4INTERFACE)
m4_parambegin
m4_param(stream, [dnl
The m4_arg(stream) parameter is the application-specified output stream to
be used for additional error information.])
m4_paramend
ifelse(M4INTERFACE,
dbenv_set_error_stream, [m4_seealso(DbEnv)], [m4_seealso(Db)])
m4_page_footer