1
<!--$Id: runtime.so,v 10.19 2001/03/13 20:39:47 bostic Exp $-->
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
6
<title>Berkeley DB Reference Guide: Run-time error information</title>
7
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
11
<table width="100%"><tr valign=top>
12
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Debugging Applications</dl></h3></td>
13
<td align=right><a href="../../ref/debug/compile.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/debug/printlog.html"><img src="../../images/next.gif" alt="Next"></a>
16
<h1 align=center>Run-time error information</h1>
17
<p>Normally, when an error occurs in the Berkeley DB library, an integer value
18
(either a Berkeley DB specific value or a system <b>errno</b> value) is
19
returned by the Berkeley DB interface. In some cases, however, this value
20
may be insufficient to completely describe the cause of the error,
21
especially during initial application debugging.
22
<p>There are four interfaces intended to provide applications with
23
additional run-time error information:
24
<a href="../../api_c/env_set_errcall.html">DB_ENV->set_errcall</a>, <a href="../../api_c/env_set_errfile.html">DB_ENV->set_errfile</a>,
25
<a href="../../api_c/env_set_errpfx.html">DB_ENV->set_errpfx</a>, and <a href="../../api_c/env_set_verbose.html">DB_ENV->set_verbose</a>.
26
<p>If the environment is configured with these interfaces, many Berkeley DB errors
27
will result in additional information being written to a file or passed
28
as an argument to an application function.
29
<p>The Berkeley DB error-reporting facilities do not slow performance or
30
significantly increase application size, and may be run during normal
31
operation as well as during debugging. Where possible, we recommend
32
that these options always be configured and the output saved in the
33
filesystem. We have found that this often saves time when debugging
34
installation or other system-integration problems.
35
<p>In addition, there are three interfaces to assist applications in
36
displaying their own error messages: <a href="../../api_c/env_strerror.html">db_strerror</a>,
37
<a href="../../api_c/env_err.html">DB_ENV->err</a>, and <a href="../../api_c/env_err.html">DB_ENV->errx</a>. The first is a superset of
38
the ANSI C strerror interface, and returns a descriptive string for any
39
error return from the Berkeley DB library. The <a href="../../api_c/env_err.html">DB_ENV->err</a> and
40
<a href="../../api_c/env_err.html">DB_ENV->errx</a> functions use the error message configuration options
41
described previously to format and display error messages to appropriate
43
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/debug/compile.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/debug/printlog.html"><img src="../../images/next.gif" alt="Next"></a>
45
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>