1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>Class ptree_bad_data</title> 6<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> 7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 8<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> 9<link rel="up" href="../../property_tree/reference.html#header.boost.property_tree.exceptions_hpp" title="Header <boost/property_tree/exceptions.hpp>"> 10<link rel="prev" href="../../property_tree/reference.html" title="Reference"> 11<link rel="next" href="ptree_bad_path.html" title="Class ptree_bad_path"> 12</head> 13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 14<table cellpadding="2" width="100%"><tr> 15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> 16<td align="center"><a href="../../../../index.html">Home</a></td> 17<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> 18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 20<td align="center"><a href="../../../../more/index.htm">More</a></td> 21</tr></table> 22<hr> 23<div class="spirit-nav"> 24<a accesskey="p" href="../../property_tree/reference.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../property_tree/reference.html#header.boost.property_tree.exceptions_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="ptree_bad_path.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="refentry"> 27<a name="boost.property_tree.ptree_bad_data"></a><div class="titlepage"></div> 28<div class="refnamediv"> 29<h2><span class="refentrytitle">Class ptree_bad_data</span></h2> 30<p>boost::property_tree::ptree_bad_data — Error indicating that translation from given value to the property tree data_type (or vice versa) failed. Derives from <a class="link" href="ptree_error.html" title="Class ptree_error">ptree_error</a>. </p> 31</div> 32<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> 33<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../property_tree/reference.html#header.boost.property_tree.exceptions_hpp" title="Header <boost/property_tree/exceptions.hpp>">boost/property_tree/exceptions.hpp</a>> 34 35</span> 36<span class="keyword">class</span> <a class="link" href="ptree_bad_data.html" title="Class ptree_bad_data">ptree_bad_data</a> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">property_tree</span><span class="special">::</span><span class="identifier">ptree_error</span> <span class="special">{</span> 37<span class="keyword">public</span><span class="special">:</span> 38 <span class="comment">// <a class="link" href="ptree_bad_data.html#boost.property_tree.ptree_bad_dataconstruct-copy-destruct">construct/copy/destruct</a></span> 39 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <a class="link" href="ptree_bad_data.html#id-1_3_32_10_1_1_1_1_4-bb"><span class="identifier">ptree_bad_data</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 40 <a class="link" href="ptree_bad_data.html#id-1_3_32_10_1_1_1_1_5-bb"><span class="special">~</span><span class="identifier">ptree_bad_data</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> 41 42 <span class="comment">// <a class="link" href="ptree_bad_data.html#id-1_3_32_10_1_1_1_1_3-bb">public member functions</a></span> 43 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <span class="identifier">T</span> <a class="link" href="ptree_bad_data.html#id-1_3_32_10_1_1_1_1_3_1-bb"><span class="identifier">data</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 44<span class="special">}</span><span class="special">;</span></pre></div> 45<div class="refsect1"> 46<a name="id-1.3.32.10.2.3.4"></a><h2>Description</h2> 47<div class="refsect2"> 48<a name="id-1.3.32.10.2.3.4.2"></a><h3> 49<a name="boost.property_tree.ptree_bad_dataconstruct-copy-destruct"></a><code class="computeroutput">ptree_bad_data</code> 50 public 51 construct/copy/destruct</h3> 52<div class="orderedlist"><ol class="orderedlist" type="1"> 53<li class="listitem"> 54<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <a name="id-1_3_32_10_1_1_1_1_4-bb"></a><span class="identifier">ptree_bad_data</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span> what<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="special">&</span> data<span class="special">)</span><span class="special">;</span></pre>Instantiate a <code class="computeroutput"><a class="link" href="ptree_bad_data.html" title="Class ptree_bad_data">ptree_bad_data</a></code> instance with the given message and data. <p> 55</p> 56<div class="variablelist"><table border="0" class="variablelist compact"> 57<colgroup> 58<col align="left" valign="top"> 59<col> 60</colgroup> 61<tbody><tr> 62<td><p><span class="term">Parameters:</span></p></td> 63<td><div class="variablelist"><table border="0" class="variablelist compact"> 64<colgroup> 65<col align="left" valign="top"> 66<col> 67</colgroup> 68<tbody> 69<tr> 70<td><p><span class="term"><code class="computeroutput">data</code></span></p></td> 71<td><p>The value associated with this error that was the source of the translation failure. </p></td> 72</tr> 73<tr> 74<td><p><span class="term"><code class="computeroutput">what</code></span></p></td> 75<td><p>The message to associate with this error. </p></td> 76</tr> 77</tbody> 78</table></div></td> 79</tr></tbody> 80</table></div> 81</li> 82<li class="listitem"><pre class="literallayout"><a name="id-1_3_32_10_1_1_1_1_5-bb"></a><span class="special">~</span><span class="identifier">ptree_bad_data</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li> 83</ol></div> 84</div> 85<div class="refsect2"> 86<a name="id-1.3.32.10.2.3.4.3"></a><h3> 87<a name="id-1_3_32_10_1_1_1_1_3-bb"></a><code class="computeroutput">ptree_bad_data</code> public member functions</h3> 88<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"> 89<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <span class="identifier">T</span> <a name="id-1_3_32_10_1_1_1_1_3_1-bb"></a><span class="identifier">data</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Retrieve the data associated with this error. This is the source value that failed to be translated. You need to explicitly specify its type. </li></ol></div> 90</div> 91</div> 92</div> 93<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 94<td align="left"></td> 95<td align="right"><div class="copyright-footer">Copyright © 2008-2010 Marcin Kalicinski<br>Copyright © 2010-2013 Sebastian 96 Redl<p> 97 Distributed under the Boost Software License, Version 1.0. (See accompanying 98 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 99 </p> 100</div></td> 101</tr></table> 102<hr> 103<div class="spirit-nav"> 104<a accesskey="p" href="../../property_tree/reference.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../property_tree/reference.html#header.boost.property_tree.exceptions_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="ptree_bad_path.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 105</div> 106</body> 107</html> 108