File indexing completed on 2025-01-18 09:39:16
0001
0002
0003
0004
0005
0006
0007 #ifndef BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED
0008 #define BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED
0009
0010 #include <boost/locale/config.hpp>
0011 #include <stdexcept>
0012 #include <string>
0013
0014 #ifdef BOOST_MSVC
0015 # pragma warning(push)
0016 # pragma warning(disable : 4275 4251 4231 4660)
0017 #endif
0018
0019 namespace boost { namespace locale { namespace conv {
0020
0021
0022
0023
0024
0025 class BOOST_SYMBOL_VISIBLE conversion_error : public std::runtime_error {
0026 public:
0027 conversion_error() : std::runtime_error("Conversion failed") {}
0028 };
0029
0030
0031
0032 class BOOST_SYMBOL_VISIBLE invalid_charset_error : public std::runtime_error {
0033 public:
0034
0035 invalid_charset_error(const std::string& charset) :
0036 std::runtime_error("Invalid or unsupported charset: " + charset)
0037 {}
0038 };
0039
0040
0041 enum method_type {
0042 skip = 0,
0043 stop = 1,
0044 default_method = skip
0045 };
0046
0047
0048
0049 }}}
0050
0051 #ifdef BOOST_MSVC
0052 # pragma warning(pop)
0053 #endif
0054
0055 #endif