| Boost.Locale

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List

boost/locale/encoding_errors.hpp

    00001 //
    00002 //  Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    00003 //
    00004 //  Distributed under the Boost Software License, Version 1.0. (See
    00005 //  accompanying file LICENSE_1_0.txt or copy at
    00006 //  http://www.boost.org/LICENSE_1_0.txt)
    00007 //
    00008 #ifndef BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED
    00009 #define BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED
    00010
    00011 #include <boost/locale/definitions.hpp>
    00012 #ifdef BOOST_MSVC
    00013 #  pragma warning(push)
    00014 #  pragma warning(disable : 4275 4251 4231 4660)
    00015 #endif
    00016 #include <stdexcept>
    00017
    00018
    00019
    00020 namespace boost {
    00021     namespace locale {
    00022         namespace conv {
    00027
    00031             class BOOST_SYMBOL_VISIBLE conversion_error : public std::runtime_error {
    00032             public:
    00033                 conversion_error() : std::runtime_error("Conversion failed") {}
    00034             };
    00035
    00040             class BOOST_SYMBOL_VISIBLE invalid_charset_error : public std::runtime_error {
    00041             public:
    00042
    00044                 invalid_charset_error(std::string charset) :
    00045                     std::runtime_error("Invalid or unsupported charset:" + charset)
    00046                 {
    00047                 }
    00048             };
    00049
    00050
    00054             typedef enum {
    00055                 skip            = 0,
    00056                 stop            = 1,
    00057                 default_method  = skip
    00058             } method_type;
    00059
    00060
    00062
    00063         } // conv
    00064
    00065     } // locale
    00066 } // boost
    00067
    00068 #ifdef BOOST_MSVC
    00069 #pragma warning(pop)
    00070 #endif
    00071
    00072 #endif
    00073
    00074 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    00075