Error handling¶
-
class
unicode_error
¶ The base class for all Unicode-related errors.
-
template<EncodingForm
Encoding
>
classencode_error
: virtual unicode_error¶ Thrown: when an error occurs during an encoding operation.
-
template<EncodingForm
Encoding
>
classdecode_error
: virtual unicode_error¶ Thrown: when an error occurs during a decoding operation.
-
auto
assume_valid
¶ A tag used to request that encoding/decoding functions assume the input has been validated before.
Warning
Using this tag with input that isn’t actually valid yields undefined behavior.
-
auto
discard_errors
¶ An error handler for encoding/decoding functions that simply discards the portions of the input that have errors.
-
auto
replace_errors
¶ An error handler for encoding/decoding functions that replaces portions of the input that have errors with a replacement character. When decoding, this is U+FFFD ʀᴇᴘʟᴀᴄᴇᴍᴇɴᴛ ᴄʜᴀʀᴀᴄᴛᴇʀ, but when encoding and the target doesn’t support it, some encoding-specific character is used instead.
-
auto
throw_error
¶ An error handler for encoding/decoding functions that throws when an error is found in the input.