blob: 12571a07ba4813ced578f0709a2366c48a5c7805 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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"/>
<title>Boost.Locale: boost/locale/encoding_errors.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="boost-small.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">Boost.Locale
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
</ul>
</div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
initNavTree('encoding__errors_8hpp.html','');
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">boost/locale/encoding_errors.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span>
<a name="l00002"></a>00002 <span class="comment">// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)</span>
<a name="l00003"></a>00003 <span class="comment">//</span>
<a name="l00004"></a>00004 <span class="comment">// Distributed under the Boost Software License, Version 1.0. (See</span>
<a name="l00005"></a>00005 <span class="comment">// accompanying file LICENSE_1_0.txt or copy at</span>
<a name="l00006"></a>00006 <span class="comment">// http://www.boost.org/LICENSE_1_0.txt)</span>
<a name="l00007"></a>00007 <span class="comment">//</span>
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;boost/locale/definitions.hpp&gt;</span>
<a name="l00012"></a>00012 <span class="preprocessor">#ifdef BOOST_MSVC</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor"># pragma warning(push)</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor"># pragma warning(disable : 4275 4251 4231 4660)</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#include &lt;stdexcept&gt;</span>
<a name="l00017"></a>00017
<a name="l00018"></a>00018
<a name="l00019"></a>00019
<a name="l00020"></a>00020 <span class="keyword">namespace </span>boost {
<a name="l00021"></a>00021 <span class="keyword">namespace </span>locale {
<a name="l00022"></a>00022 <span class="keyword">namespace </span>conv {
<a name="l00027"></a>00027
<a name="l00031"></a><a class="code" href="classboost_1_1locale_1_1conv_1_1conversion__error.html">00031</a> <span class="keyword">class </span>BOOST_SYMBOL_VISIBLE <a class="code" href="classboost_1_1locale_1_1conv_1_1conversion__error.html" title="The excepton that is thrown in case of conversion error.">conversion_error</a> : <span class="keyword">public</span> std::runtime_error {
<a name="l00032"></a>00032 <span class="keyword">public</span>:
<a name="l00033"></a>00033 <a class="code" href="classboost_1_1locale_1_1conv_1_1conversion__error.html" title="The excepton that is thrown in case of conversion error.">conversion_error</a>() : std::runtime_error(<span class="stringliteral">&quot;Conversion failed&quot;</span>) {}
<a name="l00034"></a>00034 };
<a name="l00035"></a>00035
<a name="l00040"></a><a class="code" href="classboost_1_1locale_1_1conv_1_1invalid__charset__error.html">00040</a> <span class="keyword">class </span>BOOST_SYMBOL_VISIBLE <a class="code" href="classboost_1_1locale_1_1conv_1_1invalid__charset__error.html" title="This exception is thrown in case of use of unsupported or invalid character set.">invalid_charset_error</a> : <span class="keyword">public</span> std::runtime_error {
<a name="l00041"></a>00041 <span class="keyword">public</span>:
<a name="l00042"></a>00042
<a name="l00044"></a><a class="code" href="classboost_1_1locale_1_1conv_1_1invalid__charset__error.html#ae951e3a99a115a60cc87d4d258764681">00044</a> <a class="code" href="classboost_1_1locale_1_1conv_1_1invalid__charset__error.html" title="This exception is thrown in case of use of unsupported or invalid character set.">invalid_charset_error</a>(std::string charset) :
<a name="l00045"></a>00045 std::runtime_error(<span class="stringliteral">&quot;Invalid or unsupported charset:&quot;</span> + charset)
<a name="l00046"></a>00046 {
<a name="l00047"></a>00047 }
<a name="l00048"></a>00048 };
<a name="l00049"></a>00049
<a name="l00050"></a>00050
<a name="l00054"></a><a class="code" href="group__codepage.html#ga8e3c5a274f57107ec5745e227c26ba84">00054</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00055"></a><a class="code" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84ae9b554a2955deddf714757788819edf9">00055</a> <a class="code" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84ae9b554a2955deddf714757788819edf9" title="Skip illegal/unconvertable characters.">skip</a> = 0,
<a name="l00056"></a><a class="code" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84aab08f9ee241c405ef40bd3cedb43b383">00056</a> <a class="code" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84aab08f9ee241c405ef40bd3cedb43b383" title="Stop conversion and throw conversion_error.">stop</a> = 1,
<a name="l00057"></a><a class="code" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84adcdc34a57dd2a3ca917f73c13f18b559">00057</a> <a class="code" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84adcdc34a57dd2a3ca917f73c13f18b559" title="Default method - skip.">default_method</a> = <a class="code" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84ae9b554a2955deddf714757788819edf9" title="Skip illegal/unconvertable characters.">skip</a>
<a name="l00058"></a>00058 } <a class="code" href="group__codepage.html#ga8e3c5a274f57107ec5745e227c26ba84">method_type</a>;
<a name="l00059"></a>00059
<a name="l00060"></a>00060
<a name="l00062"></a>00062
<a name="l00063"></a>00063 } <span class="comment">// conv</span>
<a name="l00064"></a>00064
<a name="l00065"></a>00065 } <span class="comment">// locale</span>
<a name="l00066"></a>00066 } <span class="comment">// boost</span>
<a name="l00067"></a>00067
<a name="l00068"></a>00068 <span class="preprocessor">#ifdef BOOST_MSVC</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">#pragma warning(pop)</span>
<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00071"></a>00071 <span class="preprocessor"></span>
<a name="l00072"></a>00072 <span class="preprocessor">#endif</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span>
<a name="l00074"></a>00074 <span class="comment">// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4</span>
<a name="l00075"></a>00075
</pre></div></div><!-- contents -->
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>encoding_errors.hpp</b> </li>
<li class="footer">
&copy; 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.
</li>
</ul>
</div>
</body>
</html>