xref: /freebsd/contrib/lutok/api-docs/html/a00899.html (revision 132f818ddbf457ee67d502cd89b5a18e0a34713d)
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<meta http-equiv="X-UA-Compatible" content="IE=11"/>
6<meta name="generator" content="Doxygen 1.9.6"/>
7<meta name="viewport" content="width=device-width, initial-scale=1"/>
8<title>Lutok: lutok::api_error Class Reference</title>
9<link href="tabs.css" rel="stylesheet" type="text/css"/>
10<script type="text/javascript" src="jquery.js"></script>
11<script type="text/javascript" src="dynsections.js"></script>
12<link href="search/search.css" rel="stylesheet" type="text/css"/>
13<script type="text/javascript" src="search/searchdata.js"></script>
14<script type="text/javascript" src="search/search.js"></script>
15<link href="doxygen.css" rel="stylesheet" type="text/css" />
16</head>
17<body>
18<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
19<div id="titlearea">
20<table cellspacing="0" cellpadding="0">
21 <tbody>
22 <tr id="projectrow">
23  <td id="projectalign">
24   <div id="projectname">Lutok<span id="projectnumber">&#160;0.6.2</span>
25   </div>
26  </td>
27 </tr>
28 </tbody>
29</table>
30</div>
31<!-- end header part -->
32<!-- Generated by Doxygen 1.9.6 -->
33<script type="text/javascript">
34/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
35var searchBox = new SearchBox("searchBox", "search/",'.html');
36/* @license-end */
37</script>
38<script type="text/javascript" src="menudata.js"></script>
39<script type="text/javascript" src="menu.js"></script>
40<script type="text/javascript">
41/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
42$(function() {
43  initMenu('',true,false,'search.php','Search');
44  $(document).ready(function() { init_search(); });
45});
46/* @license-end */
47</script>
48<div id="main-nav"></div>
49<!-- window showing the filter options -->
50<div id="MSearchSelectWindow"
51     onmouseover="return searchBox.OnSearchSelectShow()"
52     onmouseout="return searchBox.OnSearchSelectHide()"
53     onkeydown="return searchBox.OnSearchSelectKey(event)">
54</div>
55
56<!-- iframe showing the search results (closed by default) -->
57<div id="MSearchResultsWindow">
58<div id="MSearchResults">
59<div class="SRPage">
60<div id="SRIndex">
61<div id="SRResults"></div>
62<div class="SRStatus" id="Loading">Loading...</div>
63<div class="SRStatus" id="Searching">Searching...</div>
64<div class="SRStatus" id="NoMatches">No Matches</div>
65</div>
66</div>
67</div>
68</div>
69
70<div id="nav-path" class="navpath">
71  <ul>
72<li class="navelem"><b>lutok</b></li><li class="navelem"><a class="el" href="a00899.html">api_error</a></li>  </ul>
73</div>
74</div><!-- top -->
75<div class="header">
76  <div class="summary">
77<a href="#pub-methods">Public Member Functions</a> &#124;
78<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
79<a href="#pri-attribs">Private Attributes</a> &#124;
80<a href="a00896.html">List of all members</a>  </div>
81  <div class="headertitle"><div class="title">lutok::api_error Class Reference</div></div>
82</div><!--header-->
83<div class="contents">
84
85<p>Exception for errors raised by the Lua API library.
86 <a href="a00899.html#details">More...</a></p>
87
88<p><code>#include &lt;<a class="el" href="a00053_source.html">exceptions.hpp</a>&gt;</code></p>
89<div class="dynheader">
90Inheritance diagram for lutok::api_error:</div>
91<div class="dyncontent">
92 <div class="center">
93  <img src="a00899.png" usemap="#lutok::api_5Ferror_map" alt=""/>
94  <map id="lutok::api_5Ferror_map" name="lutok::api_5Ferror_map">
95<area href="a00895.html" title="Base exception for lua errors." alt="lutok::error" shape="rect" coords="0,112,111,136"/>
96  </map>
97</div></div>
98<table class="memberdecls">
99<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
100Public Member Functions</h2></td></tr>
101<tr class="memitem:aa751d87577c1b62a6aa91b183e5f00d0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00899.html#aa751d87577c1b62a6aa91b183e5f00d0">api_error</a> (const std::string &amp;, const std::string &amp;)</td></tr>
102<tr class="memdesc:aa751d87577c1b62a6aa91b183e5f00d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new error.  <br /></td></tr>
103<tr class="separator:aa751d87577c1b62a6aa91b183e5f00d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
104<tr class="memitem:ae7072e5ca79e159f18142b967279659b"><td class="memItemLeft" align="right" valign="top"><a id="ae7072e5ca79e159f18142b967279659b" name="ae7072e5ca79e159f18142b967279659b"></a>
105virtual&#160;</td><td class="memItemRight" valign="bottom"><b>~api_error</b> (void)  throw ()</td></tr>
106<tr class="memdesc:ae7072e5ca79e159f18142b967279659b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor for the error. <br /></td></tr>
107<tr class="separator:ae7072e5ca79e159f18142b967279659b"><td class="memSeparator" colspan="2">&#160;</td></tr>
108<tr class="memitem:a69a79fd116c6ab783e40139220fad08b"><td class="memItemLeft" align="right" valign="top">const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00899.html#a69a79fd116c6ab783e40139220fad08b">api_function</a> (void) const</td></tr>
109<tr class="memdesc:a69a79fd116c6ab783e40139220fad08b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the name of the Lua API function that caused this error.  <br /></td></tr>
110<tr class="separator:a69a79fd116c6ab783e40139220fad08b"><td class="memSeparator" colspan="2">&#160;</td></tr>
111<tr class="inherit_header pub_methods_a00895"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_a00895')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="a00895.html">lutok::error</a></td></tr>
112<tr class="memitem:a0c0a2ad18088fcafc0ca2a3b61ac5e00 inherit pub_methods_a00895"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00895.html#a0c0a2ad18088fcafc0ca2a3b61ac5e00">error</a> (const std::string &amp;)</td></tr>
113<tr class="memdesc:a0c0a2ad18088fcafc0ca2a3b61ac5e00 inherit pub_methods_a00895"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new error with a plain-text message.  <br /></td></tr>
114<tr class="separator:a0c0a2ad18088fcafc0ca2a3b61ac5e00 inherit pub_methods_a00895"><td class="memSeparator" colspan="2">&#160;</td></tr>
115<tr class="memitem:a0e8084a7eaeb9c462e9ebfe26c3c86e8 inherit pub_methods_a00895"><td class="memItemLeft" align="right" valign="top"><a id="a0e8084a7eaeb9c462e9ebfe26c3c86e8" name="a0e8084a7eaeb9c462e9ebfe26c3c86e8"></a>
116virtual&#160;</td><td class="memItemRight" valign="bottom"><b>~error</b> (void)  throw ()</td></tr>
117<tr class="memdesc:a0e8084a7eaeb9c462e9ebfe26c3c86e8 inherit pub_methods_a00895"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor for the error. <br /></td></tr>
118<tr class="separator:a0e8084a7eaeb9c462e9ebfe26c3c86e8 inherit pub_methods_a00895"><td class="memSeparator" colspan="2">&#160;</td></tr>
119</table><table class="memberdecls">
120<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
121Static Public Member Functions</h2></td></tr>
122<tr class="memitem:af34f12d221dbed4effb57ca541b609d5"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="a00899.html">api_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00899.html#af34f12d221dbed4effb57ca541b609d5">from_stack</a> (<a class="el" href="a00919.html">state</a> &amp;, const std::string &amp;)</td></tr>
123<tr class="memdesc:af34f12d221dbed4effb57ca541b609d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new <a class="el" href="a00899.html" title="Exception for errors raised by the Lua API library.">api_error</a> with the message on the top of the Lua stack.  <br /></td></tr>
124<tr class="separator:af34f12d221dbed4effb57ca541b609d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
125</table><table class="memberdecls">
126<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
127Private Attributes</h2></td></tr>
128<tr class="memitem:a947be5cc18d28f4feed48cdb8362a9f4"><td class="memItemLeft" align="right" valign="top"><a id="a947be5cc18d28f4feed48cdb8362a9f4" name="a947be5cc18d28f4feed48cdb8362a9f4"></a>
129std::string&#160;</td><td class="memItemRight" valign="bottom"><b>_api_function</b></td></tr>
130<tr class="memdesc:a947be5cc18d28f4feed48cdb8362a9f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Name of the Lua C API function that caused the error. <br /></td></tr>
131<tr class="separator:a947be5cc18d28f4feed48cdb8362a9f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
132</table>
133<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
134<div class="textblock"><p>Exception for errors raised by the Lua API library. </p>
135</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
136<a id="aa751d87577c1b62a6aa91b183e5f00d0" name="aa751d87577c1b62a6aa91b183e5f00d0"></a>
137<h2 class="memtitle"><span class="permalink"><a href="#aa751d87577c1b62a6aa91b183e5f00d0">&#9670;&#160;</a></span>api_error()</h2>
138
139<div class="memitem">
140<div class="memproto">
141<table class="mlabels">
142  <tr>
143  <td class="mlabels-left">
144      <table class="memname">
145        <tr>
146          <td class="memname">lutok::api_error::api_error </td>
147          <td>(</td>
148          <td class="paramtype">const std::string &amp;&#160;</td>
149          <td class="paramname"><em>api_function_</em>, </td>
150        </tr>
151        <tr>
152          <td class="paramkey"></td>
153          <td></td>
154          <td class="paramtype">const std::string &amp;&#160;</td>
155          <td class="paramname"><em>message</em>&#160;</td>
156        </tr>
157        <tr>
158          <td></td>
159          <td>)</td>
160          <td></td><td></td>
161        </tr>
162      </table>
163  </td>
164  <td class="mlabels-right">
165<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
166  </tr>
167</table>
168</div><div class="memdoc">
169
170<p>Constructs a new error. </p>
171<dl class="params"><dt>Parameters</dt><dd>
172  <table class="params">
173    <tr><td class="paramname">api_function_</td><td>The name of the API function that caused the error. </td></tr>
174    <tr><td class="paramname">message</td><td>The plain-text error message provided by Lua. </td></tr>
175  </table>
176  </dd>
177</dl>
178
179</div>
180</div>
181<h2 class="groupheader">Member Function Documentation</h2>
182<a id="a69a79fd116c6ab783e40139220fad08b" name="a69a79fd116c6ab783e40139220fad08b"></a>
183<h2 class="memtitle"><span class="permalink"><a href="#a69a79fd116c6ab783e40139220fad08b">&#9670;&#160;</a></span>api_function()</h2>
184
185<div class="memitem">
186<div class="memproto">
187      <table class="memname">
188        <tr>
189          <td class="memname">const std::string &amp; lutok::api_error::api_function </td>
190          <td>(</td>
191          <td class="paramtype">void&#160;</td>
192          <td class="paramname"></td><td>)</td>
193          <td> const</td>
194        </tr>
195      </table>
196</div><div class="memdoc">
197
198<p>Gets the name of the Lua API function that caused this error. </p>
199<dl class="section return"><dt>Returns</dt><dd>The name of the function. </dd></dl>
200
201</div>
202</div>
203<a id="af34f12d221dbed4effb57ca541b609d5" name="af34f12d221dbed4effb57ca541b609d5"></a>
204<h2 class="memtitle"><span class="permalink"><a href="#af34f12d221dbed4effb57ca541b609d5">&#9670;&#160;</a></span>from_stack()</h2>
205
206<div class="memitem">
207<div class="memproto">
208<table class="mlabels">
209  <tr>
210  <td class="mlabels-left">
211      <table class="memname">
212        <tr>
213          <td class="memname"><a class="el" href="a00899.html">lutok::api_error</a> lutok::api_error::from_stack </td>
214          <td>(</td>
215          <td class="paramtype"><a class="el" href="a00919.html">state</a> &amp;&#160;</td>
216          <td class="paramname"><em>state_</em>, </td>
217        </tr>
218        <tr>
219          <td class="paramkey"></td>
220          <td></td>
221          <td class="paramtype">const std::string &amp;&#160;</td>
222          <td class="paramname"><em>api_function_</em>&#160;</td>
223        </tr>
224        <tr>
225          <td></td>
226          <td>)</td>
227          <td></td><td></td>
228        </tr>
229      </table>
230  </td>
231  <td class="mlabels-right">
232<span class="mlabels"><span class="mlabel">static</span></span>  </td>
233  </tr>
234</table>
235</div><div class="memdoc">
236
237<p>Constructs a new <a class="el" href="a00899.html" title="Exception for errors raised by the Lua API library.">api_error</a> with the message on the top of the Lua stack. </p>
238<dl class="section pre"><dt>Precondition</dt><dd>There is an error message on the top of the stack. </dd></dl>
239<dl class="section post"><dt>Postcondition</dt><dd>The error message is popped from the stack.</dd></dl>
240<dl class="params"><dt>Parameters</dt><dd>
241  <table class="params">
242    <tr><td class="paramname">state_</td><td>The Lua state. </td></tr>
243    <tr><td class="paramname">api_function_</td><td>The name of the Lua API function that caused the error.</td></tr>
244  </table>
245  </dd>
246</dl>
247<dl class="section return"><dt>Returns</dt><dd>A new <a class="el" href="a00899.html" title="Exception for errors raised by the Lua API library.">api_error</a> with the popped message. </dd></dl>
248
249</div>
250</div>
251<hr/>The documentation for this class was generated from the following files:<ul>
252<li><a class="el" href="a00053_source.html">exceptions.hpp</a></li>
253<li>exceptions.cpp</li>
254</ul>
255</div><!-- contents -->
256<!-- start footer part -->
257<hr class="footer"/><address class="footer"><small>
258Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
259</small></address>
260</body>
261</html>
262