mirror of
https://github.com/boostorg/locale.git
synced 2026-01-22 17:32:09 +00:00
136 lines
9.4 KiB
HTML
136 lines
9.4 KiB
HTML
<!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"/>
|
|
<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"/>
|
|
<!--
|
|
Switch the lines for stand alone version
|
|
<link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
|
|
-->
|
|
<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
|
|
</head>
|
|
<body>
|
|
<div id="boost-common-heading-doc">
|
|
<div class="heading-inner">
|
|
<div class="heading-placard"></div>
|
|
|
|
<h1 class="heading-title">
|
|
<a href="http://www.boost.org/">
|
|
<!--
|
|
Switch the lines for stand alone version
|
|
<img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
|
|
-->
|
|
<img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
|
|
<span class="heading-boost">Boost</span>
|
|
<span class="heading-cpplibraries">C++ Libraries</span>
|
|
</a>
|
|
</h1>
|
|
|
|
<p class="heading-quote">
|
|
|
|
<q>...one of the most highly
|
|
regarded and expertly designed C++ library projects in the
|
|
world.</q>
|
|
|
|
<span class="heading-attribution">— <a href=
|
|
"http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
|
|
"http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
|
|
Alexandrescu</a>, <a href=
|
|
"http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
|
|
Coding Standards</a></span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="boost-common-heading-doc-spacer"></div>
|
|
<!-- Generated by Doxygen 1.7.1 -->
|
|
<div class="navigation" id="top">
|
|
<div class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="main.html"><span>Main 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 class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<h1>boost/locale/encoding_errors.hpp</h1> </div>
|
|
</div>
|
|
<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 <boost/locale/definitions.hpp></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 <stdexcept></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">"Conversion failed"</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">"Invalid or unsupported charset:"</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 } method_type;
|
|
<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>
|
|
</div>
|
|
<hr class="footer"/><address class="footer"><small>
|
|
© Copyright 2009-2011 Artyom Beilis, Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a>, Version 1.0.
|
|
</small></address>
|
|
</body>
|
|
</html>
|