1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xmlns="http://www.w3.org/1999/xhtml"> 3<head> 4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 5<meta http-equiv="X-UA-Compatible" content="IE=9"/> 6<meta name="generator" content="Doxygen 1.8.6"/> 7<title>Boost.Locale: boost/locale/encoding_errors.hpp Source File</title> 8<link href="tabs.css" rel="stylesheet" type="text/css"/> 9<script type="text/javascript" src="jquery.js"></script> 10<script type="text/javascript" src="dynsections.js"></script> 11<link href="navtree.css" rel="stylesheet" type="text/css"/> 12<script type="text/javascript" src="resize.js"></script> 13<script type="text/javascript" src="navtree.js"></script> 14<script type="text/javascript"> 15 $(document).ready(initResizable); 16 $(window).load(resizeHeight); 17</script> 18<link href="doxygen.css" rel="stylesheet" type="text/css" /> 19</head> 20<body> 21<div id="top"><!-- do not remove this div, it is closed by doxygen! --> 22<div id="titlearea"> 23<table cellspacing="0" cellpadding="0"> 24 <tbody> 25 <tr style="height: 56px;"> 26 <td id="projectlogo"><img alt="Logo" src="boost-small.png"/></td> 27 <td style="padding-left: 0.5em;"> 28 <div id="projectname">Boost.Locale 29 </div> 30 </td> 31 </tr> 32 </tbody> 33</table> 34</div> 35<!-- end header part --> 36<!-- Generated by Doxygen 1.8.6 --> 37 <div id="navrow1" class="tabs"> 38 <ul class="tablist"> 39 <li><a href="index.html"><span>Main Page</span></a></li> 40 <li><a href="pages.html"><span>Related Pages</span></a></li> 41 <li><a href="modules.html"><span>Modules</span></a></li> 42 <li><a href="namespaces.html"><span>Namespaces</span></a></li> 43 <li><a href="annotated.html"><span>Classes</span></a></li> 44 <li class="current"><a href="files.html"><span>Files</span></a></li> 45 <li><a href="examples.html"><span>Examples</span></a></li> 46 </ul> 47 </div> 48 <div id="navrow2" class="tabs2"> 49 <ul class="tablist"> 50 <li><a href="files.html"><span>File List</span></a></li> 51 </ul> 52 </div> 53</div><!-- top --> 54<div id="side-nav" class="ui-resizable side-nav-resizable"> 55 <div id="nav-tree"> 56 <div id="nav-tree-contents"> 57 <div id="nav-sync" class="sync"></div> 58 </div> 59 </div> 60 <div id="splitbar" style="-moz-user-select:none;" 61 class="ui-resizable-handle"> 62 </div> 63</div> 64<script type="text/javascript"> 65$(document).ready(function(){initNavTree('encoding__errors_8hpp_source.html','');}); 66</script> 67<div id="doc-content"> 68<div class="header"> 69 <div class="headertitle"> 70<div class="title">encoding_errors.hpp</div> </div> 71</div><!--header--> 72<div class="contents"> 73<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//</span></div> 74<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)</span></div> 75<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">//</span></div> 76<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">// Distributed under the Boost Software License, Version 1.0. (See</span></div> 77<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// accompanying file LICENSE_1_0.txt or copy at</span></div> 78<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">// http://www.boost.org/LICENSE_1_0.txt)</span></div> 79<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">//</span></div> 80<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#ifndef BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED</span></div> 81<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor"></span><span class="preprocessor">#define BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED</span></div> 82<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor"></span></div> 83<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include <boost/locale/definitions.hpp></span></div> 84<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#ifdef BOOST_MSVC</span></div> 85<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor"></span><span class="preprocessor"># pragma warning(push)</span></div> 86<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor"></span><span class="preprocessor"># pragma warning(disable : 4275 4251 4231 4660)</span></div> 87<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor"></span><span class="preprocessor">#endif</span></div> 88<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor"></span><span class="preprocessor">#include <stdexcept></span></div> 89<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div> 90<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div> 91<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> </div> 92<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="keyword">namespace </span>boost {</div> 93<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  <span class="keyword">namespace </span>locale {</div> 94<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <span class="keyword">namespace </span>conv {</div> 95<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div> 96<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1conv_1_1conversion__error.html"> 31</a></span>  <span class="keyword">class </span>BOOST_SYMBOL_VISIBLE <a class="code" href="classboost_1_1locale_1_1conv_1_1conversion__error.html">conversion_error</a> : <span class="keyword">public</span> std::runtime_error {</div> 97<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <span class="keyword">public</span>:</div> 98<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <a class="code" href="classboost_1_1locale_1_1conv_1_1conversion__error.html">conversion_error</a>() : std::runtime_error(<span class="stringliteral">"Conversion failed"</span>) {}</div> 99<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  };</div> 100<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  </div> 101<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1conv_1_1invalid__charset__error.html"> 40</a></span>  <span class="keyword">class </span>BOOST_SYMBOL_VISIBLE <a class="code" href="classboost_1_1locale_1_1conv_1_1invalid__charset__error.html">invalid_charset_error</a> : <span class="keyword">public</span> std::runtime_error {</div> 102<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keyword">public</span>:</div> 103<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div> 104<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1conv_1_1invalid__charset__error.html#ae951e3a99a115a60cc87d4d258764681"> 44</a></span>  <a class="code" href="classboost_1_1locale_1_1conv_1_1invalid__charset__error.html#ae951e3a99a115a60cc87d4d258764681">invalid_charset_error</a>(std::string charset) : </div> 105<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  std::runtime_error(<span class="stringliteral">"Invalid or unsupported charset:"</span> + charset)</div> 106<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  {</div> 107<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  }</div> 108<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  };</div> 109<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  </div> 110<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> </div> 111<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="group__codepage.html#ga8e3c5a274f57107ec5745e227c26ba84"> 54</a></span>  <span class="keyword">typedef</span> <span class="keyword">enum</span> {</div> 112<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84ae9b554a2955deddf714757788819edf9"> 55</a></span>  <a class="code" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84ae9b554a2955deddf714757788819edf9">skip</a> = 0, </div> 113<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84aab08f9ee241c405ef40bd3cedb43b383"> 56</a></span>  <a class="code" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84aab08f9ee241c405ef40bd3cedb43b383">stop</a> = 1, </div> 114<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84adcdc34a57dd2a3ca917f73c13f18b559"> 57</a></span>  <a class="code" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84adcdc34a57dd2a3ca917f73c13f18b559">default_method</a> = <a class="code" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84ae9b554a2955deddf714757788819edf9">skip</a> </div> 115<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  } <a class="code" href="group__codepage.html#ga8e3c5a274f57107ec5745e227c26ba84">method_type</a>;</div> 116<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div> 117<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div> 118<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div> 119<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  } <span class="comment">// conv</span></div> 120<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div> 121<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  } <span class="comment">// locale</span></div> 122<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> } <span class="comment">// boost</span></div> 123<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div> 124<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="preprocessor">#ifdef BOOST_MSVC</span></div> 125<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="preprocessor"></span><span class="preprocessor">#pragma warning(pop)</span></div> 126<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="preprocessor"></span><span class="preprocessor">#endif</span></div> 127<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="preprocessor"></span></div> 128<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="preprocessor">#endif</span></div> 129<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="preprocessor"></span></div> 130<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="comment">// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4</span></div> 131<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div> 132<div class="ttc" id="classboost_1_1locale_1_1conv_1_1conversion__error_html"><div class="ttname"><a href="classboost_1_1locale_1_1conv_1_1conversion__error.html">boost::locale::conv::conversion_error</a></div><div class="ttdoc">The excepton that is thrown in case of conversion error. </div><div class="ttdef"><b>Definition:</b> encoding_errors.hpp:31</div></div> 133<div class="ttc" id="classboost_1_1locale_1_1conv_1_1invalid__charset__error_html"><div class="ttname"><a href="classboost_1_1locale_1_1conv_1_1invalid__charset__error.html">boost::locale::conv::invalid_charset_error</a></div><div class="ttdoc">This exception is thrown in case of use of unsupported or invalid character set. </div><div class="ttdef"><b>Definition:</b> encoding_errors.hpp:40</div></div> 134<div class="ttc" id="group__codepage_html_gga8e3c5a274f57107ec5745e227c26ba84adcdc34a57dd2a3ca917f73c13f18b559"><div class="ttname"><a href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84adcdc34a57dd2a3ca917f73c13f18b559">boost::locale::conv::default_method</a></div><div class="ttdoc">Default method - skip. </div><div class="ttdef"><b>Definition:</b> encoding_errors.hpp:57</div></div> 135<div class="ttc" id="classboost_1_1locale_1_1conv_1_1invalid__charset__error_html_ae951e3a99a115a60cc87d4d258764681"><div class="ttname"><a href="classboost_1_1locale_1_1conv_1_1invalid__charset__error.html#ae951e3a99a115a60cc87d4d258764681">boost::locale::conv::invalid_charset_error::invalid_charset_error</a></div><div class="ttdeci">invalid_charset_error(std::string charset)</div><div class="ttdoc">Create an error for charset charset. </div><div class="ttdef"><b>Definition:</b> encoding_errors.hpp:44</div></div> 136<div class="ttc" id="group__codepage_html_gga8e3c5a274f57107ec5745e227c26ba84aab08f9ee241c405ef40bd3cedb43b383"><div class="ttname"><a href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84aab08f9ee241c405ef40bd3cedb43b383">boost::locale::conv::stop</a></div><div class="ttdoc">Stop conversion and throw conversion_error. </div><div class="ttdef"><b>Definition:</b> encoding_errors.hpp:56</div></div> 137<div class="ttc" id="group__codepage_html_gga8e3c5a274f57107ec5745e227c26ba84ae9b554a2955deddf714757788819edf9"><div class="ttname"><a href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84ae9b554a2955deddf714757788819edf9">boost::locale::conv::skip</a></div><div class="ttdoc">Skip illegal/unconvertable characters. </div><div class="ttdef"><b>Definition:</b> encoding_errors.hpp:55</div></div> 138<div class="ttc" id="group__codepage_html_ga8e3c5a274f57107ec5745e227c26ba84"><div class="ttname"><a href="group__codepage.html#ga8e3c5a274f57107ec5745e227c26ba84">boost::locale::conv::method_type</a></div><div class="ttdeci">method_type</div><div class="ttdef"><b>Definition:</b> encoding_errors.hpp:54</div></div> 139</div><!-- fragment --></div><!-- contents --> 140</div><!-- doc-content --> 141 142 <li class="footer"> 143© Copyright 2009-2012 Artyom Beilis, Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a>, Version 1.0. 144 </li> 145 </ul> 146 </div> 147</body> 148</html> 149