2
3
4
5
6
7
8
9
10
11
12
13
16#ifndef _PCRE2CPP_EXCEPTIONS_HPP_
17 #define _PCRE2CPP_EXCEPTIONS_HPP_
19 #include <pcre2cpp/config.hpp>
22_PCRE2CPP_ERROR(
"This is only available for c++17 and greater!");
25 #include <pcre2cpp/types.hpp>
26 #include <pcre2cpp/utils/pcre2_data.hpp>
28 #include <pcre2cpp/utils/assert.hpp>
33
34
35
36
37
38
56
57
58
59
60
61
62
65 const size_t error_offset)
noexcept {
92
93
94
95
96
97
126 #pragma region PCRE2CPP_EXCEPTION
129
130
131
132
164 #if _PCRE2CPP_HAS_UTF8
167 #if _PCRE2CPP_HAS_UTF16
170 #if _PCRE2CPP_HAS_UTF32
176 #pragma endregion PCRE2CPP_EXCEPTION
178 #pragma region REGEX_EXCEPTION
181
182
183
184
201 #if _PCRE2CPP_HAS_UTF8
204 #if _PCRE2CPP_HAS_UTF16
207 #if _PCRE2CPP_HAS_UTF32
213 #pragma endregion REGEX_EXCEPTION
215 #pragma region MATCH_RESULT_EXCEPTION
218
219
220
221
238 #if _PCRE2CPP_HAS_UTF8
241 #if _PCRE2CPP_HAS_UTF16
244 #if _PCRE2CPP_HAS_UTF32
250 #pragma endregion MATCH_RESULT_EXCEPTION
base pcre2cpp exception class
Definition exceptions.hpp:134
utf_type
Enum with supported utf types.
Definition pcre2_data.hpp:31
static _PCRE2CPP_CONSTEXPR17 utils::pcre2_data< utf >::string_type generate_error_message(const int error_code) noexcept
Function which generate error message based on pcre2 error code.
Definition exceptions.hpp:40
static _PCRE2CPP_CONSTEXPR17 utils::pcre2_data< utf >::string_type generate_error_message(const int error_code, const size_t error_offset) noexcept
Function which generates error message based on pcre2 error code and with additional information abou...
Definition exceptions.hpp:64
static _PCRE2CPP_CONSTEXPR20 std::string convert_any_utf_to_utf8(const typename utils::pcre2_data< utf >::string_view_type message) noexcept
converts any message from any utf to utf-8
Definition exceptions.hpp:99
#define _PCRE2CPP_CONSTEXPR17
constexpr for c++17 and higher
Definition config.hpp:236
#define _PCRE2CPP_CONSTEXPR20
constexpr keyword for c++20 and higher
Definition config.hpp:253
#define _PCRE2CPP_HAS_ASSERTS
check if asserts are enabled
Definition config.hpp:172
#define _PCRE2CPP_HAS_UTF32
check if support for UTF-32 is enabled
Definition config.hpp:215
#define _PCRE2CPP_HAS_CXX17
check if compiler has c++ version greater or equal to c++17
Definition config.hpp:133
#define _PCRE2CPP_HAS_UTF8
check if support for UTF-8 is enabled
Definition config.hpp:203
#define _PCRE2CPP_HAS_UTF16
check if support for UTF-16 is enabled
Definition config.hpp:209
#define _PCRE2CPP_HAS_EXCEPTIONS
check if exceptions are enabled
Definition config.hpp:171
Translation container from pcre2 library to pcre2cpp.
Definition pcre2_data.hpp:68