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 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>MySQL++ Reference Manual</title>
<meta http-equiv="Content-type" content="text/html;charset=iso-8859-1">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- Generated by Doxygen 1.8.5 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>mysqlpp</b></li><li class="navelem"><a class="el" href="classmysqlpp_1_1BadQuery.html">BadQuery</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="classmysqlpp_1_1BadQuery-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">mysqlpp::BadQuery Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classmysqlpp_1_1Exception.html" title="Base class for all MySQL++ custom exceptions. ">Exception</a> thrown when the database server encounters a problem while processing your query.
<a href="classmysqlpp_1_1BadQuery.html#details">More...</a></p>
<p><code>#include <<a class="el" href="exceptions_8h_source.html">exceptions.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for mysqlpp::BadQuery:</div>
<div class="dyncontent">
<div class="center"><img src="classmysqlpp_1_1BadQuery__inherit__graph.png" border="0" usemap="#mysqlpp_1_1BadQuery_inherit__map" alt="Inheritance graph"/></div>
<map name="mysqlpp_1_1BadQuery_inherit__map" id="mysqlpp_1_1BadQuery_inherit__map">
<area shape="rect" id="node2" href="classmysqlpp_1_1Exception.html" title="Base class for all MySQL++ custom exceptions. " alt="" coords="5,80,141,107"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for mysqlpp::BadQuery:</div>
<div class="dyncontent">
<div class="center"><img src="classmysqlpp_1_1BadQuery__coll__graph.png" border="0" usemap="#mysqlpp_1_1BadQuery_coll__map" alt="Collaboration graph"/></div>
<map name="mysqlpp_1_1BadQuery_coll__map" id="mysqlpp_1_1BadQuery_coll__map">
<area shape="rect" id="node2" href="classmysqlpp_1_1Exception.html" title="Base class for all MySQL++ custom exceptions. " alt="" coords="41,96,177,123"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a49600596b86773d8a13f0cd15a02118a"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1BadQuery.html#a49600596b86773d8a13f0cd15a02118a">BadQuery</a> (const char *w="", int e=0)</td></tr>
<tr class="memdesc:a49600596b86773d8a13f0cd15a02118a"><td class="mdescLeft"> </td><td class="mdescRight">Create exception object. <a href="#a49600596b86773d8a13f0cd15a02118a">More...</a><br/></td></tr>
<tr class="separator:a49600596b86773d8a13f0cd15a02118a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a35999dcc51a6cd76a03bd4a1d565d888"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1BadQuery.html#a35999dcc51a6cd76a03bd4a1d565d888">BadQuery</a> (const std::string &w, int e=0)</td></tr>
<tr class="memdesc:a35999dcc51a6cd76a03bd4a1d565d888"><td class="mdescLeft"> </td><td class="mdescRight">Create exception object. <a href="#a35999dcc51a6cd76a03bd4a1d565d888">More...</a><br/></td></tr>
<tr class="separator:a35999dcc51a6cd76a03bd4a1d565d888"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa59e11113935fad141f156e6d61bb85e"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1BadQuery.html#aa59e11113935fad141f156e6d61bb85e">errnum</a> () const </td></tr>
<tr class="memdesc:aa59e11113935fad141f156e6d61bb85e"><td class="mdescLeft"> </td><td class="mdescRight">Return the error number corresponding to the error message returned by <a class="el" href="classmysqlpp_1_1Exception.html#a970fe1876f16ea720382dff87f80cf17" title="Returns explanation of why exception was thrown. ">what()</a> <a href="#aa59e11113935fad141f156e6d61bb85e">More...</a><br/></td></tr>
<tr class="separator:aa59e11113935fad141f156e6d61bb85e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classmysqlpp_1_1Exception"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classmysqlpp_1_1Exception')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classmysqlpp_1_1Exception.html">mysqlpp::Exception</a></td></tr>
<tr class="memitem:a4f630373546f0048348d89a7e83c1c77 inherit pub_methods_classmysqlpp_1_1Exception"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4f630373546f0048348d89a7e83c1c77"></a>
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Exception.html#a4f630373546f0048348d89a7e83c1c77">Exception</a> (const <a class="el" href="classmysqlpp_1_1Exception.html">Exception</a> &e) throw ()</td></tr>
<tr class="memdesc:a4f630373546f0048348d89a7e83c1c77 inherit pub_methods_classmysqlpp_1_1Exception"><td class="mdescLeft"> </td><td class="mdescRight">Create exception object as copy of another. <br/></td></tr>
<tr class="separator:a4f630373546f0048348d89a7e83c1c77 inherit pub_methods_classmysqlpp_1_1Exception"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2103d37da48b9824fa4407863aef9e0e inherit pub_methods_classmysqlpp_1_1Exception"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2103d37da48b9824fa4407863aef9e0e"></a>
<a class="el" href="classmysqlpp_1_1Exception.html">Exception</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Exception.html#a2103d37da48b9824fa4407863aef9e0e">operator=</a> (const <a class="el" href="classmysqlpp_1_1Exception.html">Exception</a> &rhs) throw ()</td></tr>
<tr class="memdesc:a2103d37da48b9824fa4407863aef9e0e inherit pub_methods_classmysqlpp_1_1Exception"><td class="mdescLeft"> </td><td class="mdescRight">Assign another exception object's contents to this one. <br/></td></tr>
<tr class="separator:a2103d37da48b9824fa4407863aef9e0e inherit pub_methods_classmysqlpp_1_1Exception"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a82b1a9a71b10a4b83cd67905689d700d inherit pub_methods_classmysqlpp_1_1Exception"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a82b1a9a71b10a4b83cd67905689d700d"></a>
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Exception.html#a82b1a9a71b10a4b83cd67905689d700d">~Exception</a> () throw ()</td></tr>
<tr class="memdesc:a82b1a9a71b10a4b83cd67905689d700d inherit pub_methods_classmysqlpp_1_1Exception"><td class="mdescLeft"> </td><td class="mdescRight">Destroy exception object. <br/></td></tr>
<tr class="separator:a82b1a9a71b10a4b83cd67905689d700d inherit pub_methods_classmysqlpp_1_1Exception"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a970fe1876f16ea720382dff87f80cf17 inherit pub_methods_classmysqlpp_1_1Exception"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a970fe1876f16ea720382dff87f80cf17"></a>
virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Exception.html#a970fe1876f16ea720382dff87f80cf17">what</a> () const throw ()</td></tr>
<tr class="memdesc:a970fe1876f16ea720382dff87f80cf17 inherit pub_methods_classmysqlpp_1_1Exception"><td class="mdescLeft"> </td><td class="mdescRight">Returns explanation of why exception was thrown. <br/></td></tr>
<tr class="separator:a970fe1876f16ea720382dff87f80cf17 inherit pub_methods_classmysqlpp_1_1Exception"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_methods_classmysqlpp_1_1Exception"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classmysqlpp_1_1Exception')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classmysqlpp_1_1Exception.html">mysqlpp::Exception</a></td></tr>
<tr class="memitem:ad9410f221db3876329a168d6c6a0864f inherit pro_methods_classmysqlpp_1_1Exception"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad9410f221db3876329a168d6c6a0864f"></a>
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Exception.html#ad9410f221db3876329a168d6c6a0864f">Exception</a> (const char *w="") throw ()</td></tr>
<tr class="memdesc:ad9410f221db3876329a168d6c6a0864f inherit pro_methods_classmysqlpp_1_1Exception"><td class="mdescLeft"> </td><td class="mdescRight">Create exception object. <br/></td></tr>
<tr class="separator:ad9410f221db3876329a168d6c6a0864f inherit pro_methods_classmysqlpp_1_1Exception"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab6bce06d1c5f5a8ace87764ea118e25d inherit pro_methods_classmysqlpp_1_1Exception"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab6bce06d1c5f5a8ace87764ea118e25d"></a>
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Exception.html#ab6bce06d1c5f5a8ace87764ea118e25d">Exception</a> (const std::string &w) throw ()</td></tr>
<tr class="memdesc:ab6bce06d1c5f5a8ace87764ea118e25d inherit pro_methods_classmysqlpp_1_1Exception"><td class="mdescLeft"> </td><td class="mdescRight">Create exception object. <br/></td></tr>
<tr class="separator:ab6bce06d1c5f5a8ace87764ea118e25d inherit pro_methods_classmysqlpp_1_1Exception"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pro_attribs_classmysqlpp_1_1Exception"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classmysqlpp_1_1Exception')"><img src="closed.png" alt="-"/> Protected Attributes inherited from <a class="el" href="classmysqlpp_1_1Exception.html">mysqlpp::Exception</a></td></tr>
<tr class="memitem:a9d1f31934daa02fdbedfe419be524191 inherit pro_attribs_classmysqlpp_1_1Exception"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9d1f31934daa02fdbedfe419be524191"></a>
std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Exception.html#a9d1f31934daa02fdbedfe419be524191">what_</a></td></tr>
<tr class="memdesc:a9d1f31934daa02fdbedfe419be524191 inherit pro_attribs_classmysqlpp_1_1Exception"><td class="mdescLeft"> </td><td class="mdescRight">explanation of why exception was thrown <br/></td></tr>
<tr class="separator:a9d1f31934daa02fdbedfe419be524191 inherit pro_attribs_classmysqlpp_1_1Exception"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classmysqlpp_1_1Exception.html" title="Base class for all MySQL++ custom exceptions. ">Exception</a> thrown when the database server encounters a problem while processing your query. </p>
<p>Unlike most other MySQL++ exceptions, which carry just an error message, this type carries an error number to preserve <a class="el" href="classmysqlpp_1_1Connection.html#a3cb1bf601b19dbb87b36bed4590f4214" title="Return last error number associated with this connection. ">Connection::errnum()</a>'s return value at the point the exception is thrown. We do this because when using the <a class="el" href="classmysqlpp_1_1Transaction.html" title="Helper object for creating exception-safe SQL transactions. ">Transaction</a> class, the rollback process that occurs during stack unwinding issues a query to the database server, overwriting the error value. This rollback should always succeed, so this effect can fool code that relies on <a class="el" href="classmysqlpp_1_1Connection.html#a3cb1bf601b19dbb87b36bed4590f4214" title="Return last error number associated with this connection. ">Connection::errnum()</a> into believing that there was no error.</p>
<p>Beware that in older versions of MySQL++, this was effectively the generic exception type. (This is most especially true in v1.7.x, but it continued to a lesser extent through the v2.x series.) When converting old code to new versions of MySQL++, it's therefore possible to get seemingly "new" exceptions thrown, which could crash your program if you don't also catch a more generic type like <a class="el" href="classmysqlpp_1_1Exception.html" title="Base class for all MySQL++ custom exceptions. ">mysqlpp::Exception</a> or std::exception. </p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="a49600596b86773d8a13f0cd15a02118a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">mysqlpp::BadQuery::BadQuery </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>w</em> = <code>""</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>e</em> = <code>0</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create exception object. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">w</td><td>explanation for why the exception was thrown </td></tr>
<tr><td class="paramname">e</td><td>the error number from the underlying database API </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a35999dcc51a6cd76a03bd4a1d565d888"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">mysqlpp::BadQuery::BadQuery </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>e</em> = <code>0</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create exception object. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">w</td><td>explanation for why the exception was thrown </td></tr>
<tr><td class="paramname">e</td><td>the error number from the underlying database API </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aa59e11113935fad141f156e6d61bb85e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int mysqlpp::BadQuery::errnum </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the error number corresponding to the error message returned by <a class="el" href="classmysqlpp_1_1Exception.html#a970fe1876f16ea720382dff87f80cf17" title="Returns explanation of why exception was thrown. ">what()</a> </p>
<p>This may return the same value as <a class="el" href="classmysqlpp_1_1Connection.html#a3cb1bf601b19dbb87b36bed4590f4214" title="Return last error number associated with this connection. ">Connection::errnum()</a>, but not always. See the overview documentation for this class for the reason for the difference. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="exceptions_8h_source.html">exceptions.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Mar 18 2015 18:55:03 for MySQL++ by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
|