1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <title>Release 4.3: DB_ENV->set_errcall, DB->set_errcall</title> 7 <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> 9 <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" /> 10 <link rel="up" href="upgrade_4_3_toc.html" title="Chapter��40.��Upgrading Berkeley DB 4.2 applications to Berkeley DB 4.3" /> 11 <link rel="prev" href="upgrade_4_3_java.html" title="Release 4.3: Java" /> 12 <link rel="next" href="upgrade_4_3_cput.html" title="Release 4.3: DBcursor->c_put" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">Release 4.3: DB_ENV->set_errcall, DB->set_errcall</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="upgrade_4_3_java.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��40.��Upgrading Berkeley DB 4.2 applications to Berkeley DB 4.3</th> 23 <td width="20%" align="right">��<a accesskey="n" href="upgrade_4_3_cput.html">Next</a></td> 24 </tr> 25 </table> 26 <hr /> 27 </div> 28 <div class="sect1" lang="en" xml:lang="en"> 29 <div class="titlepage"> 30 <div> 31 <div> 32 <h2 class="title" style="clear: both"><a id="upgrade_4_3_err"></a>Release 4.3: DB_ENV->set_errcall, DB->set_errcall</h2> 33 </div> 34 </div> 35 </div> 36 <p>The signature of the error callback passed to the 37<a href="../api_reference/C/envset_errcall.html" class="olink">DB_ENV->set_errcall()</a> and <a href="../api_reference/C/dbset_errcall.html" class="olink">DB->set_errcall()</a> methods has changed in 38the 4.3 release. For example, if you previously had a function such as 39this:</p> 40 <pre class="programlisting">void handle_db_error(const char *prefix, char *message);</pre> 41 <p>it should be changed to this:</p> 42 <pre class="programlisting">void handle_db_error(const DB_ENV *dbenv, 43 const char *prefix, const char *message);</pre> 44 <p>This change adds the <a href="../api_reference/C/env.html" class="olink">DB_ENV</a> handle to provide database 45environment context for the callback function, and incidentally makes 46it clear the message parameter cannot be changed by the callback.</p> 47 </div> 48 <div class="navfooter"> 49 <hr /> 50 <table width="100%" summary="Navigation footer"> 51 <tr> 52 <td width="40%" align="left"><a accesskey="p" href="upgrade_4_3_java.html">Prev</a>��</td> 53 <td width="20%" align="center"> 54 <a accesskey="u" href="upgrade_4_3_toc.html">Up</a> 55 </td> 56 <td width="40%" align="right">��<a accesskey="n" href="upgrade_4_3_cput.html">Next</a></td> 57 </tr> 58 <tr> 59 <td width="40%" align="left" valign="top">Release 4.3: Java��</td> 60 <td width="20%" align="center"> 61 <a accesskey="h" href="index.html">Home</a> 62 </td> 63 <td width="40%" align="right" valign="top">��Release 4.3: DBcursor->c_put</td> 64 </tr> 65 </table> 66 </div> 67 </body> 68</html> 69