public interface DbErrcall
{
public abstract void errcall(String prefix, String buffer);
}
public class DbEnv
{
public void set_errcall(DbErrcall errcall);
...
}
Description
The DbEnv.set_errcall method can be used to replace the mechanism for
reporting error messages to the user. By default, DB native methods write
error messages using the C library's stderr, which are often not visible
in the Java environment. To allow alternative styles of error reporting,
set_errcall can be called with a single object argument. The object's
class must implement the DbErrcall interface. When an error occurs, the
object's errcall() method is invoked with two arguments; the first is the
prefix string (set by set_errpfx), the second will be the error message
string. It is up to this method to display the message in an appropriate
manner.