|
zxing-cpp v3.0
|
#include <Error.h>
Public Types | |
| enum class | Type : uint8_t |
Public Member Functions | |
| Type | type () const noexcept |
| const std::string & | msg () const noexcept |
| operator bool () const noexcept | |
| std::string | location () const |
| Error ()=default | |
| Error (Type type, std::string msg={}) | |
| Error (const char *file, short line, Type type, std::string msg={}) | |
| bool | operator== (const Error &o) const noexcept |
| bool | operator!= (const Error &o) const noexcept |
Static Public Attributes | |
| static constexpr auto | Format = Type::Format |
| static constexpr auto | Checksum = Type::Checksum |
| static constexpr auto | Unsupported = Type::Unsupported |
The Error class is a value type for the error() member of Barcode.
The use-case of this class is to communicate whether or not a particular Barcode symbol is in error. It is (primarily) not meant to be thrown as an exception and therefore not derived from std::exception. The library code may throw (and catch!) objects of this class as a convenient means of flow control (c++23's std::expected will allow to replace those use-cases with something similarly convenient). In those situations, the author is advised to make sure any thrown Error object is caught before leaking into user/wrapper code, i.e. the functions of the public API should be considered noexcept with respect to this class.
|
strong |
|
default |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineexplicitnoexcept |
| std::string ZXing::Error::location | ( | ) | const |
The source code location where the error was detected (if available).
|
inlinenoexcept |
|
inlinenoexcept |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |