CppCMS
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
booster
locale
encoding_errors.h
1
//
2
// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
3
//
4
// Distributed under the Boost Software License, Version 1.0. (See
5
// accompanying file LICENSE_1_0.txt or copy at
6
// http://www.boost.org/LICENSE_1_0.txt)
7
//
8
#ifndef BOOSTER_LOCALE_ENCODING_ERRORS_H_INCLUDED
9
#define BOOSTER_LOCALE_ENCODING_ERRORS_H_INCLUDED
10
11
#include <booster/config.h>
12
#ifdef BOOSTER_MSVC
13
# pragma warning(push)
14
# pragma warning(disable : 4275 4251 4231 4660)
15
#endif
16
#include <booster/backtrace.h>
17
18
19
20
namespace
booster
{
21
namespace
locale
{
22
namespace
conv {
27
31
class
conversion_error
:
public
booster::runtime_error
{
32
public
:
33
conversion_error
() :
booster::runtime_error
(
"Conversion failed"
) {}
34
};
35
40
class
invalid_charset_error
:
public
booster::runtime_error
{
41
public
:
42
44
invalid_charset_error
(std::string charset) :
45
booster
::
runtime_error
(
"Invalid or unsupported charset:"
+ charset)
46
{
47
}
48
};
49
50
54
typedef
enum
{
55
skip
= 0,
56
stop
= 1,
57
default_method
=
skip
58
}
method_type
;
59
60
62
63
}
// conv
64
65
}
// locale
66
}
// boost
67
68
#ifdef BOOSTER_MSVC
69
#pragma warning(pop)
70
#endif
71
72
#endif
73
74
// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
75
booster::runtime_error
Same as std::runtime_error but records stack trace.
Definition:
backtrace.h:158
booster::locale::conv::default_method
Default method - skip.
Definition:
encoding_errors.h:57
booster::locale::conv::conversion_error
The excepton that is thrown in case of conversion error.
Definition:
encoding_errors.h:31
booster::locale::conv::invalid_charset_error
This exception is thrown in case of use of unsupported or invalid character set.
Definition:
encoding_errors.h:40
booster::locale
This is the main namespace that encloses all localization classes.
Definition:
locale_fwd.h:14
booster::locale::conv::invalid_charset_error::invalid_charset_error
invalid_charset_error(std::string charset)
Create an error for charset charset.
Definition:
encoding_errors.h:44
booster::locale::conv::skip
Skip illegal/unconvertable characters.
Definition:
encoding_errors.h:55
booster::locale::conv::method_type
method_type
Definition:
encoding_errors.h:54
booster
Booster library namespace. The library that implements Boost Like API in ABI backward compatible way...
Definition:
application.h:23
booster::locale::conv::stop
Stop conversion and throw conversion_error.
Definition:
encoding_errors.h:56
Generated on Sun Dec 3 2017 22:47:16 for CppCMS by
1.8.11