1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Chapter 29. Dbstl Exception Classes</title>
<link rel="stylesheet" href="apiReference.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Berkeley DB C++ Standard Template Library API Reference" />
<link rel="up" href="index.html" title="Berkeley DB C++ Standard Template Library API Reference" />
<link rel="prev" href="stlReadModifyWriteOptionno_read_modify_write.html" title="no_read_modify_write" />
<link rel="next" href="DbstlException.html" title="Chapter 30. DbstlException" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
<p>Library Version 11.2.5.3</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">Chapter 29.
Dbstl Exception Classes </th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="stlReadModifyWriteOptionno_read_modify_write.html">Prev</a> </td>
<th width="60%" align="center"> </th>
<td width="20%" align="right"> <a accesskey="n" href="DbstlException.html">Next</a></td>
</tr>
</table>
<hr />
</div>
<div class="chapter" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="Exception_classes_group"></a>Chapter 29.
Dbstl Exception Classes </h2>
</div>
</div>
</div>
<p>dbstl throws several types of exceptions on several kinds of errors, the exception classes form a class hiarachy. </p>
<p>First, there is the <a class="link" href="DbstlException.html" title="Chapter 30. DbstlException">DbstlException</a>
, which is the base class for all types of dbstl specific concrete exception classes. <a class="link" href="DbstlException.html" title="Chapter 30. DbstlException">DbstlException</a>
inherits from the class DbException of Berkeley DB C++ API. Since DbException class inherits from C++ STL exception base class std::exception, you can make use of all Berkeley DB C++ and dbstl API exceptions in the same way you use the C++ std::exception class.</p>
<p>Besides exceptions of <a class="link" href="DbstlException.html" title="Chapter 30. DbstlException">DbstlException</a>
and its subclasses, dbstl may also throw exceptions of DbException and its subclasses, which happens when a Berkeley DB call failed. So you should use the same way you catch Berkeley DB C++ API exceptions when you want to catch exceptions throw by Berkeley DB operations.</p>
<p>When an exception occurs, dbstl initialize an local exception object on the stack and throws the exception object, so you should catch an exception like this:</p>
<p>try { dbstl operations } catch(DbstlException ex){ Exception handling throw ex; // Optionally throw ex again } </p>
<h4><a id="idp51797024"></a> Public Members </h4>
<div class="informaltable">
<table border="1" width="80%">
<colgroup>
<col />
<col />
</colgroup>
<thead>
<tr>
<th>Member</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a class="link" href="DbstlException.html" title="Chapter 30. DbstlException">
DbstlException</a>
</td>
<td>
DbstlException</td>
</tr>
<tr>
<td>
<a class="link" href="NotEnoughMemoryException.html" title="Chapter 35. NotEnoughMemoryException">
NotEnoughMemoryException</a>
</td>
<td>
NotEnoughMemoryException</td>
</tr>
<tr>
<td>
<a class="link" href="InvalidIteratorException.html" title="Chapter 37. InvalidIteratorException">
InvalidIteratorException</a>
</td>
<td>
InvalidIteratorException</td>
</tr>
<tr>
<td>
<a class="link" href="InvalidCursorException.html" title="Chapter 33. InvalidCursorException">
InvalidCursorException</a>
</td>
<td>
InvalidCursorException</td>
</tr>
<tr>
<td>
<a class="link" href="InvalidDbtException.html" title="Chapter 31. InvalidDbtException">
InvalidDbtException</a>
</td>
<td>
InvalidDbtException</td>
</tr>
<tr>
<td>
<a class="link" href="FailedAssertionException.html" title="Chapter 32. FailedAssertionException">
FailedAssertionException</a>
</td>
<td>
FailedAssertionException</td>
</tr>
<tr>
<td>
<a class="link" href="NoSuchKeyException.html" title="Chapter 34. NoSuchKeyException">
NoSuchKeyException</a>
</td>
<td>
NoSuchKeyException</td>
</tr>
<tr>
<td>
<a class="link" href="InvalidArgumentException.html" title="Chapter 39. InvalidArgumentException">
InvalidArgumentException</a>
</td>
<td>
InvalidArgumentException</td>
</tr>
<tr>
<td>
<a class="link" href="NotSupportedException.html" title="Chapter 36. NotSupportedException">
NotSupportedException</a>
</td>
<td>
NotSupportedException</td>
</tr>
<tr>
<td>
<a class="link" href="InvalidFunctionCall.html" title="Chapter 38. InvalidFunctionCall">
InvalidFunctionCall</a>
</td>
<td>
InvalidFunctionCall</td>
</tr>
</tbody>
</table>
</div>
<h4><a id="idp51808192"></a>
Group</h4>
<p>
None</p>
</div>
<div class="navfooter">
<hr />
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="stlReadModifyWriteOptionno_read_modify_write.html">Prev</a> </td>
<td width="20%" align="center"> </td>
<td width="40%" align="right"> <a accesskey="n" href="DbstlException.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">no_read_modify_write </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
<td width="40%" align="right" valign="top"> Chapter 30.
DbstlException </td>
</tr>
</table>
</div>
</body>
</html>
|