Files
CocoaTweet/help/html/classnlohmann_1_1detail_1_1exception.html
T

377 lines
19 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CocoaTweet: nlohmann::detail::exception Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">CocoaTweet
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacenlohmann.html">nlohmann</a></li><li class="navelem"><a class="el" href="namespacenlohmann_1_1detail.html">detail</a></li><li class="navelem"><a class="el" href="classnlohmann_1_1detail_1_1exception.html">exception</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a> &#124;
<a href="classnlohmann_1_1detail_1_1exception-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">nlohmann::detail::exception Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>general exception of the <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> class
<a href="classnlohmann_1_1detail_1_1exception.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="build_2__deps_2json-src_2include_2nlohmann_2json_8hpp_source.html">json.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for nlohmann::detail::exception:</div>
<div class="dyncontent">
<div class="center"><img src="classnlohmann_1_1detail_1_1exception__inherit__graph.png" border="0" usemap="#nlohmann_1_1detail_1_1exception_inherit__map" alt="Inheritance graph"/></div>
<map name="nlohmann_1_1detail_1_1exception_inherit__map" id="nlohmann_1_1detail_1_1exception_inherit__map">
<area shape="rect" title="general exception of the basic_json class" alt="" coords="140,143,344,170"/>
<area shape="rect" href="classnlohmann_1_1detail_1_1invalid__iterator.html" title="exception indicating errors with iterators" alt="" coords="392,5,576,47"/>
<area shape="rect" href="classnlohmann_1_1detail_1_1other__error.html" title="exception indicating other library errors" alt="" coords="397,71,571,112"/>
<area shape="rect" href="classnlohmann_1_1detail_1_1out__of__range.html" title="exception indicating access out of the defined range" alt="" coords="403,136,565,177"/>
<area shape="rect" href="classnlohmann_1_1detail_1_1parse__error.html" title="exception indicating a parse error" alt="" coords="396,201,572,243"/>
<area shape="rect" href="classnlohmann_1_1detail_1_1type__error.html" title="exception indicating executing a member function with a wrong type" alt="" coords="399,267,569,308"/>
<area shape="rect" title=" " alt="" coords="5,143,92,170"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for nlohmann::detail::exception:</div>
<div class="dyncontent">
<div class="center"><img src="classnlohmann_1_1detail_1_1exception__coll__graph.png" border="0" usemap="#nlohmann_1_1detail_1_1exception_coll__map" alt="Collaboration graph"/></div>
<map name="nlohmann_1_1detail_1_1exception_coll__map" id="nlohmann_1_1detail_1_1exception_coll__map">
<area shape="rect" title="general exception of the basic_json class" alt="" coords="5,80,209,107"/>
<area shape="rect" title=" " alt="" coords="64,5,151,32"/>
</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:a11fe48748e811531614c84883b00ccd5"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="third_2nlohmann_2json_8hpp.html#a5f2aaec3b681d0a72f7d6e90b70cdcd1">JSON_HEDLEY_RETURNS_NON_NULL</a> char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1detail_1_1exception.html#a11fe48748e811531614c84883b00ccd5">what</a> () const noexcept override</td></tr>
<tr class="memdesc:a11fe48748e811531614c84883b00ccd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the explanatory string <a href="classnlohmann_1_1detail_1_1exception.html#a11fe48748e811531614c84883b00ccd5">More...</a><br /></td></tr>
<tr class="separator:a11fe48748e811531614c84883b00ccd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11fe48748e811531614c84883b00ccd5"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="third_2nlohmann_2json_8hpp.html#a5f2aaec3b681d0a72f7d6e90b70cdcd1">JSON_HEDLEY_RETURNS_NON_NULL</a> char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1detail_1_1exception.html#a11fe48748e811531614c84883b00ccd5">what</a> () const noexcept override</td></tr>
<tr class="memdesc:a11fe48748e811531614c84883b00ccd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the explanatory string <a href="classnlohmann_1_1detail_1_1exception.html#a11fe48748e811531614c84883b00ccd5">More...</a><br /></td></tr>
<tr class="separator:a11fe48748e811531614c84883b00ccd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a0d4589a3fb54e81646d986c05efa3b9a"><td class="memItemLeft" align="right" valign="top">const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1detail_1_1exception.html#a0d4589a3fb54e81646d986c05efa3b9a">id</a></td></tr>
<tr class="memdesc:a0d4589a3fb54e81646d986c05efa3b9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">the id of the exception <a href="classnlohmann_1_1detail_1_1exception.html#a0d4589a3fb54e81646d986c05efa3b9a">More...</a><br /></td></tr>
<tr class="separator:a0d4589a3fb54e81646d986c05efa3b9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:ae323ad0d53bc724414c2233164e65657"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1detail_1_1exception.html#ae323ad0d53bc724414c2233164e65657">exception</a> (int id_, const char *what_arg)</td></tr>
<tr class="separator:ae323ad0d53bc724414c2233164e65657"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae323ad0d53bc724414c2233164e65657"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1detail_1_1exception.html#ae323ad0d53bc724414c2233164e65657">exception</a> (int id_, const char *what_arg)</td></tr>
<tr class="separator:ae323ad0d53bc724414c2233164e65657"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr class="memitem:abf41a7e9178356314082284e6cfea278"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1detail_1_1exception.html#abf41a7e9178356314082284e6cfea278">name</a> (const std::string &amp;ename, int id_)</td></tr>
<tr class="separator:abf41a7e9178356314082284e6cfea278"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf41a7e9178356314082284e6cfea278"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1detail_1_1exception.html#abf41a7e9178356314082284e6cfea278">name</a> (const std::string &amp;ename, int id_)</td></tr>
<tr class="separator:abf41a7e9178356314082284e6cfea278"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>general exception of the <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> class </p>
<p>This class is an extension of <code>std::exception</code> objects with a member <em>id</em> for exception ids. It is used as the base class for all exceptions thrown by the <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> class. This class can hence be used as "wildcard" to catch exceptions.</p>
<p>Subclasses:</p><ul>
<li><a class="el" href="classnlohmann_1_1detail_1_1parse__error.html">parse_error</a> for exceptions indicating a parse error</li>
<li><a class="el" href="classnlohmann_1_1detail_1_1invalid__iterator.html">invalid_iterator</a> for exceptions indicating errors with iterators</li>
<li><a class="el" href="classnlohmann_1_1detail_1_1type__error.html">type_error</a> for exceptions indicating executing a member function with a wrong type</li>
<li><a class="el" href="classnlohmann_1_1detail_1_1out__of__range.html">out_of_range</a> for exceptions indicating access out of the defined range</li>
<li><a class="el" href="classnlohmann_1_1detail_1_1other__error.html">other_error</a> for exceptions indicating other library errors</li>
</ul>
<p>@liveexample{The following code shows how arbitrary library exceptions can be caught.,exception}</p>
<dl class="section since"><dt>Since</dt><dd>version 3.0.0 </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ae323ad0d53bc724414c2233164e65657"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae323ad0d53bc724414c2233164e65657">&#9670;&nbsp;</a></span>exception() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">nlohmann::detail::exception::exception </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>id_</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>what_arg</em>&#160;</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">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ae323ad0d53bc724414c2233164e65657"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae323ad0d53bc724414c2233164e65657">&#9670;&nbsp;</a></span>exception() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">nlohmann::detail::exception::exception </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>id_</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>what_arg</em>&#160;</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">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="abf41a7e9178356314082284e6cfea278"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf41a7e9178356314082284e6cfea278">&#9670;&nbsp;</a></span>name() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static std::string nlohmann::detail::exception::name </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>ename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>id_</em>&#160;</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">static</span><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="abf41a7e9178356314082284e6cfea278"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf41a7e9178356314082284e6cfea278">&#9670;&nbsp;</a></span>name() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static std::string nlohmann::detail::exception::name </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>ename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>id_</em>&#160;</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">static</span><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a11fe48748e811531614c84883b00ccd5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11fe48748e811531614c84883b00ccd5">&#9670;&nbsp;</a></span>what() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="third_2nlohmann_2json_8hpp.html#a5f2aaec3b681d0a72f7d6e90b70cdcd1">JSON_HEDLEY_RETURNS_NON_NULL</a> char* nlohmann::detail::exception::what </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 class="mlabel">override</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns the explanatory string </p>
</div>
</div>
<a id="a11fe48748e811531614c84883b00ccd5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11fe48748e811531614c84883b00ccd5">&#9670;&nbsp;</a></span>what() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="third_2nlohmann_2json_8hpp.html#a5f2aaec3b681d0a72f7d6e90b70cdcd1">JSON_HEDLEY_RETURNS_NON_NULL</a> char* nlohmann::detail::exception::what </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 class="mlabel">override</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns the explanatory string </p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a0d4589a3fb54e81646d986c05efa3b9a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d4589a3fb54e81646d986c05efa3b9a">&#9670;&nbsp;</a></span>id</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const int nlohmann::detail::exception::id</td>
</tr>
</table>
</div><div class="memdoc">
<p>the id of the exception </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>build/_deps/json-src/include/nlohmann/<a class="el" href="build_2__deps_2json-src_2include_2nlohmann_2json_8hpp_source.html">json.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>