Held error: an std::error_code and a StormByte::CString message.
More...
#include <StormByte/error.hxx>
|
|
| | Fault () noexcept |
| | Success.
|
| |
| | Fault (const std::error_code &code) |
| | From an std::error_code.
|
| |
| template<Described Enum> |
| | Fault (Enum e) |
| | From a described enumerator.
|
| |
| | Fault (const Fault &other)=default |
| | Copy constructor.
|
| |
| | Fault (Fault &&other) noexcept=default |
| | Move constructor.
|
| |
| | ~Fault () noexcept=default |
| | Destructor.
|
| |
| Fault & | operator= (const Fault &other)=default |
| | Copy assignment.
|
| |
| Fault & | operator= (Fault &&other) noexcept=default |
| | Move assignment.
|
| |
|
| const std::error_code & | code () const noexcept |
| | Held code.
|
| |
| const char * | what () const noexcept |
| | Owned message (category: message).
|
| |
| | operator bool () const noexcept |
| | Whether this is an error.
|
| |
Held error: an std::error_code and a StormByte::CString message.
Used as object state (File, tube Fail). Not thrown. operator bool is true when the code is an error.
◆ Fault() [1/5]
| StormByte::Error::Fault::Fault |
( |
| ) |
|
|
noexcept |
◆ Fault() [2/5]
| StormByte::Error::Fault::Fault |
( |
const std::error_code & |
code | ) |
|
|
explicit |
From an std::error_code.
- Parameters
-
◆ Fault() [3/5]
template<Described Enum>
| StormByte::Error::Fault::Fault |
( |
Enum |
e | ) |
|
|
inlineexplicit |
From a described enumerator.
- Template Parameters
-
- Parameters
-
Uses ADL make_error_code(e) so the module singleton category is the one stored in the code.
◆ Fault() [4/5]
| StormByte::Error::Fault::Fault |
( |
const Fault & |
other | ) |
|
|
default |
Copy constructor.
- Parameters
-
◆ Fault() [5/5]
| StormByte::Error::Fault::Fault |
( |
Fault && |
other | ) |
|
|
defaultnoexcept |
Move constructor.
- Parameters
-
◆ ~Fault()
| StormByte::Error::Fault::~Fault |
( |
| ) |
|
|
defaultnoexcept |
◆ code()
| const std::error_code & StormByte::Error::Fault::code |
( |
| ) |
const |
|
noexcept |
◆ operator bool()
| StormByte::Error::Fault::operator bool |
( |
| ) |
const |
|
explicitnoexcept |
Whether this is an error.
- Returns
- true if the held code is non-zero.
◆ operator=() [1/2]
| Fault & StormByte::Error::Fault::operator= |
( |
const Fault & |
other | ) |
|
|
default |
Copy assignment.
- Parameters
-
- Returns
- *this.
◆ operator=() [2/2]
| Fault & StormByte::Error::Fault::operator= |
( |
Fault && |
other | ) |
|
|
defaultnoexcept |
Move assignment.
- Parameters
-
- Returns
- *this.
◆ what()
| const char * StormByte::Error::Fault::what |
( |
| ) |
const |
|
noexcept |
Owned message (category: message).
- Returns
- NUL-terminated text owned by this object.
The documentation for this class was generated from the following file: