1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!--NewPage--> 3<HTML> 4<HEAD> 5<!-- Generated by javadoc (build 1.5.0) on Thu May 15 17:17:31 EDT 2008 --> 6<TITLE> 7ErrorHandler (Oracle - Berkeley DB Java API) 8</TITLE> 9 10<META NAME="keywords" CONTENT="com.sleepycat.db.ErrorHandler interface"> 11 12<LINK REL ="stylesheet" TYPE="text/css" HREF="/style.css" TITLE="Style"> 13 14<SCRIPT type="text/javascript"> 15function windowTitle() 16{ 17 parent.document.title="ErrorHandler (Oracle - Berkeley DB Java API)"; 18} 19</SCRIPT> 20<NOSCRIPT> 21</NOSCRIPT> 22 23</HEAD> 24 25<BODY BGCOLOR="white" onload="windowTitle();"> 26 27 28<!-- ========= START OF TOP NAVBAR ======= --> 29<A NAME="navbar_top"><!-- --></A> 30<A HREF="#skip-navbar_top" title="Skip navigation links"></A> 31<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 32<TR> 33<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 34<A NAME="navbar_top_firstrow"><!-- --></A> 35<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 36 <TR ALIGN="center" VALIGN="top"> 37 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 39 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ErrorHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 45 </TR> 46</TABLE> 47</TD> 48<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 49<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM> 50</TD> 51</TR> 52 53<TR> 54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 55 <A HREF="/com/sleepycat/db/EnvironmentConfig.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A> 56 <A HREF="/com/sleepycat/db/EventHandler.html" title="interface in com.sleepycat.db"><B>NEXT CLASS</B></A></FONT></TD> 57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 58 <A HREF="/index.html?com/sleepycat/db/ErrorHandler.html" target="_top"><B>FRAMES</B></A> 59 <A HREF="ErrorHandler.html" target="_top"><B>NO FRAMES</B></A> 60 <SCRIPT type="text/javascript"> 61 <!-- 62 if(window==top) { 63 document.writeln('<A HREF="/allclasses-noframe.html"><B>All Classes</B></A>'); 64 } 65 //--> 66</SCRIPT> 67<NOSCRIPT> 68 <A HREF="/allclasses-noframe.html"><B>All Classes</B></A> 69</NOSCRIPT> 70 71 72</FONT></TD> 73</TR> 74<TR> 75<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 76 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 78DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 79</TR> 80</TABLE> 81<A NAME="skip-navbar_top"></A> 82<!-- ========= END OF TOP NAVBAR ========= --> 83 84<HR> 85<!-- ======== START OF CLASS DATA ======== --> 86<H2> 87<FONT SIZE="-1"> 88com.sleepycat.db</FONT> 89<BR> 90Interface ErrorHandler</H2> 91<HR> 92<DL> 93<DT><PRE>public interface <B>ErrorHandler</B></DL> 94</PRE> 95 96<P> 97An interface specifying a callback function to be called when an error 98occurs in the Berkeley DB library. 99<P> 100 101<P> 102<HR> 103 104<P> 105 106<!-- ========== METHOD SUMMARY =========== --> 107 108<A NAME="method_summary"><!-- --></A> 109<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 110<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 111<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 112<B>Method Summary</B></FONT></TH> 113</TR> 114<TR BGCOLOR="white" CLASS="TableRowColor"> 115<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 116<CODE> void</CODE></FONT></TD> 117<TD><CODE><B><A HREF="/com/sleepycat/db/ErrorHandler.html#error(com.sleepycat.db.Environment, java.lang.String, java.lang.String)">error</A></B>(<A HREF="/com/sleepycat/db/Environment.html" title="class in com.sleepycat.db">Environment</A> environment, 118 <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> errpfx, 119 <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> msg)</CODE> 120 121<BR> 122 A callback function to be called when an error occurs in the 123 Berkeley DB library.</TD> 124</TR> 125</TABLE> 126 127<P> 128 129<!-- ============ METHOD DETAIL ========== --> 130 131<A NAME="method_detail"><!-- --></A> 132<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 133<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 134<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 135<B>Method Detail</B></FONT></TH> 136</TR> 137</TABLE> 138 139<A NAME="error(com.sleepycat.db.Environment, java.lang.String, java.lang.String)"><!-- --></A><H3> 140error</H3> 141<PRE> 142void <B>error</B>(<A HREF="/com/sleepycat/db/Environment.html" title="class in com.sleepycat.db">Environment</A> environment, 143 <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> errpfx, 144 <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> msg)</PRE> 145<DL> 146<DD>A callback function to be called when an error occurs in the 147 Berkeley DB library. 148 <p> 149 When an error occurs in the Berkeley DB library, an exception is 150 thrown. In some cases, however, the exception may be insufficient 151 to completely describe the cause of the error, especially during 152 initial application debugging. 153 <p> 154 The <A HREF="/com/sleepycat/db/EnvironmentConfig.html#setErrorHandler(com.sleepycat.db.ErrorHandler)"><CODE>EnvironmentConfig.setErrorHandler</CODE></A> and 155 <A HREF="/com/sleepycat/db/DatabaseConfig.html#setErrorHandler(com.sleepycat.db.ErrorHandler)"><CODE>DatabaseConfig.setErrorHandler</CODE></A> methods are used to enhance 156 the mechanism for reporting error messages to the application. In 157 some cases, when an error occurs, Berkeley DB will invoke the 158 ErrorHandler's object error method. It is up to this method to 159 display the error message in an appropriate manner. <p> 160<P> 161<DD><DL> 162<DT><B>Parameters:</B><DD><CODE>environment</CODE> - The enclosing database environment handle. 163 <p><DD><CODE>errpfx</CODE> - The prefix string, as previously configured by 164 <A HREF="/com/sleepycat/db/EnvironmentConfig.html#setErrorPrefix(java.lang.String)"><CODE>EnvironmentConfig.setErrorPrefix</CODE></A> or 165 <A HREF="/com/sleepycat/db/DatabaseConfig.html#setErrorPrefix(java.lang.String)"><CODE>DatabaseConfig.setErrorPrefix</CODE></A>. 166 <p><DD><CODE>msg</CODE> - An error message string.</DL> 167</DD> 168</DL> 169<!-- ========= END OF CLASS DATA ========= --> 170<HR> 171 172 173<!-- ======= START OF BOTTOM NAVBAR ====== --> 174<A NAME="navbar_bottom"><!-- --></A> 175<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 176<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 177<TR> 178<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 179<A NAME="navbar_bottom_firstrow"><!-- --></A> 180<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 181 <TR ALIGN="center" VALIGN="top"> 182 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 183 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 184 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 185 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ErrorHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 186 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 187 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 188 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 189 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 190 </TR> 191</TABLE> 192</TD> 193<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 194<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM> 195</TD> 196</TR> 197 198<TR> 199<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 200 <A HREF="/com/sleepycat/db/EnvironmentConfig.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A> 201 <A HREF="/com/sleepycat/db/EventHandler.html" title="interface in com.sleepycat.db"><B>NEXT CLASS</B></A></FONT></TD> 202<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 203 <A HREF="/index.html?com/sleepycat/db/ErrorHandler.html" target="_top"><B>FRAMES</B></A> 204 <A HREF="ErrorHandler.html" target="_top"><B>NO FRAMES</B></A> 205 <SCRIPT type="text/javascript"> 206 <!-- 207 if(window==top) { 208 document.writeln('<A HREF="/allclasses-noframe.html"><B>All Classes</B></A>'); 209 } 210 //--> 211</SCRIPT> 212<NOSCRIPT> 213 <A HREF="/allclasses-noframe.html"><B>All Classes</B></A> 214</NOSCRIPT> 215 216 217</FONT></TD> 218</TR> 219<TR> 220<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 221 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 222<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 223DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 224</TR> 225</TABLE> 226<A NAME="skip-navbar_bottom"></A> 227<!-- ======== END OF BOTTOM NAVBAR ======= --> 228 229<HR> 230<font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 231</BODY> 232</HTML> 233