env_set_error_stream.html   [plain text]


<!--$Id: env_set_error_stream.html,v 1.1.1.1 2003/02/15 04:55:51 zarzycki Exp $-->
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
<!--All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DbEnv.set_error_stream</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a>
<table width="100%"><tr valign=top>
<td>
<h1>DbEnv.set_error_stream</h1>
</td>
<td align=right>
<a href="../api_java/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<hr size=1 noshade>
<tt>
<h3><pre>
import com.sleepycat.db.*;
<p>
public void DbEnv.set_error_stream(OutputStream s)
	throws DbException
</pre></h3>
<h1>Description</h1>
<p>When an error occurs in the Berkeley DB library, an exception is thrown.  In
some cases, however, the <b>errno</b> value may be insufficient to
completely describe the cause of the error, especially during initial
application debugging.
<p>The DbEnv.set_error_stream and <a href="../api_java/db_set_error_stream.html">Db.set_error_stream</a> methods
are used to enhance the mechanism for reporting error messages to the
application by setting a OutputStream to be used for displaying additional
Berkeley DB error messages.  In some cases, when an error occurs, Berkeley DB will
output an additional error message to the specified stream.
<p>The error message will consist of the prefix string and a colon
("<b>:</b>") (if a prefix string was previously specified using
<a href="../api_java/env_set_errpfx.html">DbEnv.set_errpfx</a>), an error string, and a trailing
&lt;newline&gt; character.
<p>Alternatively, you can use the <a href="../api_java/env_set_errcall.html">DbEnv.set_errcall</a> method to capture the
additional error information in a way that does not use output streams.
You should not mix these approaches.
<p>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.
<h1>Class</h1>
<a href="../api_java/env_class.html">DbEnv</a>
<h1>See Also</h1>
<a href="../api_java/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_java/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
</body>
</html>