#include <expect.h>
|
| static void | throw_ (std::error_code ec, const char *msg, const char *file, unsigned line) |
| |
| template<typename T > |
| static T | unwrap (::expect< T > &&result, const char *error_msg, const char *file, unsigned line) |
| | If result.has_error() call throw_. Otherwise,. More...
|
| |
| static void | unwrap (::expect< void > &&result, const char *error_msg, const char *file, unsigned line) |
| | If result.has_error() call throw_. More...
|
| |
Definition at line 78 of file expect.h.
◆ throw_()
| void expect< T >::throw_ |
( |
std::error_code |
ec, |
|
|
const char * |
msg, |
|
|
const char * |
file, |
|
|
unsigned |
line |
|
) |
| |
|
static |
- Exceptions
-
| std::system_error | with ec, optional msg and/or optional file + line. |
Definition at line 64 of file expect.cpp.
67 throw std::system_error{ec, generate_error(msg, file, line)};
68 throw std::system_error{ec};
◆ unwrap() [1/2]
template<typename T >
| static T detail::expect::unwrap |
( |
::expect< T > && |
result, |
|
|
const char * |
error_msg, |
|
|
const char * |
file, |
|
|
unsigned |
line |
|
) |
| |
|
inlinestatic |
If result.has_error() call throw_. Otherwise,.
- Returns
*result by move.
Definition at line 85 of file expect.h.
std::error_code error() const noexcept
const T & move(const T &t)
static void throw_(std::error_code ec, const char *msg, const char *file, unsigned line)
◆ unwrap() [2/2]
| void expect< T >::unwrap |
( |
::expect< void > && |
result, |
|
|
const char * |
error_msg, |
|
|
const char * |
file, |
|
|
unsigned |
line |
|
) |
| |
|
inlinestatic |
If result.has_error() call throw_.
Definition at line 443 of file expect.h.
static void throw_(std::error_code ec, const char *msg, const char *file, unsigned line)
std::error_code error() const noexcept
The documentation for this struct was generated from the following files:
- /home/abuild/rpmbuild/BUILD/electroneum-5.0.0.4/src/common/expect.h
- /home/abuild/rpmbuild/BUILD/electroneum-5.0.0.4/src/common/expect.cpp