| 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>Chapter 29. Dbstl Exception Classes</title> |
| 7 | <link rel="stylesheet" href="apiReference.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 C++ Standard Template Library API Reference" /> |
| 10 | <link rel="up" href="index.html" title="Berkeley DB C++ Standard Template Library API Reference" /> |
| 11 | <link rel="prev" href="stlReadModifyWriteOptionno_read_modify_write.html" title="no_read_modify_write" /> |
| 12 | <link rel="next" href="DbstlException.html" title="Chapter 30. DbstlException" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">Chapter 29. |
| 22 | Dbstl Exception Classes </th> |
| 23 | </tr> |
| 24 | <tr> |
| 25 | <td width="20%" align="left"><a accesskey="p" href="stlReadModifyWriteOptionno_read_modify_write.html">Prev</a> </td> |
| 26 | <th width="60%" align="center"> </th> |
| 27 | <td width="20%" align="right"> <a accesskey="n" href="DbstlException.html">Next</a></td> |
| 28 | </tr> |
| 29 | </table> |
| 30 | <hr /> |
| 31 | </div> |
| 32 | <div class="chapter" lang="en" xml:lang="en"> |
| 33 | <div class="titlepage"> |
| 34 | <div> |
| 35 | <div> |
| 36 | <h2 class="title"><a id="Exception_classes_group"></a>Chapter 29. |
| 37 | Dbstl Exception Classes </h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <p>dbstl throws several types of exceptions on several kinds of errors, the exception classes form a class hiarachy. </p> |
| 42 | <p>First, there is the <a class="link" href="DbstlException.html" title="Chapter 30. DbstlException">DbstlException</a> |
| 43 | , 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> |
| 44 | 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> |
| 45 | <p>Besides exceptions of <a class="link" href="DbstlException.html" title="Chapter 30. DbstlException">DbstlException</a> |
| 46 | 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> |
| 47 | <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> |
| 48 | <p>try { dbstl operations } catch(DbstlException ex){ Exception handling throw ex; // Optionally throw ex again } </p> |
| 49 | <h4><a id="idp51797024"></a> Public Members </h4> |
| 50 | <div class="informaltable"> |
| 51 | <table border="1" width="80%"> |
| 52 | <colgroup> |
| 53 | <col /> |
| 54 | <col /> |
| 55 | </colgroup> |
| 56 | <thead> |
| 57 | <tr> |
| 58 | <th>Member</th> |
| 59 | <th>Description</th> |
| 60 | </tr> |
| 61 | </thead> |
| 62 | <tbody> |
| 63 | <tr> |
| 64 | <td> |
| 65 | <a class="link" href="DbstlException.html" title="Chapter 30. DbstlException"> |
| 66 | DbstlException</a> |
| 67 | </td> |
| 68 | <td> |
| 69 | DbstlException</td> |
| 70 | </tr> |
| 71 | <tr> |
| 72 | <td> |
| 73 | <a class="link" href="NotEnoughMemoryException.html" title="Chapter 35. NotEnoughMemoryException"> |
| 74 | NotEnoughMemoryException</a> |
| 75 | </td> |
| 76 | <td> |
| 77 | NotEnoughMemoryException</td> |
| 78 | </tr> |
| 79 | <tr> |
| 80 | <td> |
| 81 | <a class="link" href="InvalidIteratorException.html" title="Chapter 37. InvalidIteratorException"> |
| 82 | InvalidIteratorException</a> |
| 83 | </td> |
| 84 | <td> |
| 85 | InvalidIteratorException</td> |
| 86 | </tr> |
| 87 | <tr> |
| 88 | <td> |
| 89 | <a class="link" href="InvalidCursorException.html" title="Chapter 33. InvalidCursorException"> |
| 90 | InvalidCursorException</a> |
| 91 | </td> |
| 92 | <td> |
| 93 | InvalidCursorException</td> |
| 94 | </tr> |
| 95 | <tr> |
| 96 | <td> |
| 97 | <a class="link" href="InvalidDbtException.html" title="Chapter 31. InvalidDbtException"> |
| 98 | InvalidDbtException</a> |
| 99 | </td> |
| 100 | <td> |
| 101 | InvalidDbtException</td> |
| 102 | </tr> |
| 103 | <tr> |
| 104 | <td> |
| 105 | <a class="link" href="FailedAssertionException.html" title="Chapter 32. FailedAssertionException"> |
| 106 | FailedAssertionException</a> |
| 107 | </td> |
| 108 | <td> |
| 109 | FailedAssertionException</td> |
| 110 | </tr> |
| 111 | <tr> |
| 112 | <td> |
| 113 | <a class="link" href="NoSuchKeyException.html" title="Chapter 34. NoSuchKeyException"> |
| 114 | NoSuchKeyException</a> |
| 115 | </td> |
| 116 | <td> |
| 117 | NoSuchKeyException</td> |
| 118 | </tr> |
| 119 | <tr> |
| 120 | <td> |
| 121 | <a class="link" href="InvalidArgumentException.html" title="Chapter 39. InvalidArgumentException"> |
| 122 | InvalidArgumentException</a> |
| 123 | </td> |
| 124 | <td> |
| 125 | InvalidArgumentException</td> |
| 126 | </tr> |
| 127 | <tr> |
| 128 | <td> |
| 129 | <a class="link" href="NotSupportedException.html" title="Chapter 36. NotSupportedException"> |
| 130 | NotSupportedException</a> |
| 131 | </td> |
| 132 | <td> |
| 133 | NotSupportedException</td> |
| 134 | </tr> |
| 135 | <tr> |
| 136 | <td> |
| 137 | <a class="link" href="InvalidFunctionCall.html" title="Chapter 38. InvalidFunctionCall"> |
| 138 | InvalidFunctionCall</a> |
| 139 | </td> |
| 140 | <td> |
| 141 | InvalidFunctionCall</td> |
| 142 | </tr> |
| 143 | </tbody> |
| 144 | </table> |
| 145 | </div> |
| 146 | <h4><a id="idp51808192"></a> |
| 147 | Group</h4> |
| 148 | <p> |
| 149 | None</p> |
| 150 | </div> |
| 151 | <div class="navfooter"> |
| 152 | <hr /> |
| 153 | <table width="100%" summary="Navigation footer"> |
| 154 | <tr> |
| 155 | <td width="40%" align="left"><a accesskey="p" href="stlReadModifyWriteOptionno_read_modify_write.html">Prev</a> </td> |
| 156 | <td width="20%" align="center"> </td> |
| 157 | <td width="40%" align="right"> <a accesskey="n" href="DbstlException.html">Next</a></td> |
| 158 | </tr> |
| 159 | <tr> |
| 160 | <td width="40%" align="left" valign="top">no_read_modify_write </td> |
| 161 | <td width="20%" align="center"> |
| 162 | <a accesskey="h" href="index.html">Home</a> |
| 163 | </td> |
| 164 | <td width="40%" align="right" valign="top"> Chapter 30. |
| 165 | DbstlException </td> |
| 166 | </tr> |
| 167 | </table> |
| 168 | </div> |
| 169 | </body> |
| 170 | </html> |