Line data Source code
1 : /* libutf8/exception.h -- convert between wchar_t and UTF-8 encodings
2 : * Copyright (C) 2000-2015 Made to Order Software Corporation
3 : *
4 : * This program is free software; you can redistribute it and/or modify
5 : * it under the terms of the GNU General Public License as published by
6 : * the Free Software Foundation; either version 2 of the License, or
7 : * (at your option) any later version.
8 : *
9 : * This program is distributed in the hope that it will be useful,
10 : * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 : * GNU General Public License for more details.
13 : *
14 : * You should have received a copy of the GNU General Public License along
15 : * with this program; if not, write to the Free Software Foundation, Inc.,
16 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 : *
18 : * Authors
19 : * Alexis Wilke alexis@m2osw.com
20 : */
21 : #pragma once
22 :
23 : /** \file
24 : * \brief The declarations of the UTF-8 library.
25 : *
26 : * This file is the declarations of the UTF-8 library which are just a few
27 : * functions used to convert a string from one format to another.
28 : */
29 :
30 : #include <libexcept/exception.h>
31 :
32 :
33 :
34 : namespace libutf8
35 : {
36 :
37 :
38 :
39 64419 : class libutf8_logic_exception : public libexcept::logic_exception_t
40 : {
41 : public:
42 64419 : libutf8_logic_exception(std::string const & msg) : logic_exception_t(msg) {}
43 : };
44 :
45 :
46 :
47 456010 : class libutf8_exception : public libexcept::exception_t
48 : {
49 : public:
50 456010 : libutf8_exception(std::string const & msg) : exception_t(msg) {}
51 : };
52 :
53 :
54 :
55 107761 : class libutf8_exception_decoding : public libutf8_exception
56 : {
57 : public:
58 107761 : libutf8_exception_decoding(std::string const & msg) : libutf8_exception(msg) {}
59 : };
60 :
61 :
62 :
63 348249 : class libutf8_exception_encoding : public libutf8_exception
64 : {
65 : public:
66 348249 : libutf8_exception_encoding(std::string const & msg) : libutf8_exception(msg) {}
67 : };
68 :
69 :
70 :
71 : class libutf8_exception_unsupported : public libutf8_exception
72 : {
73 : public:
74 : libutf8_exception_unsupported(std::string const & msg) : libutf8_exception(msg) {}
75 : };
76 :
77 :
78 :
79 :
80 :
81 : } // libutf8 namespace
82 : // vim: ts=4 sw=4 et
|