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