#include <cassert>
#include <system_error>
#include <type_traits>
#include <utility>
#include "common/error.h"
Go to the source code of this file.
|
| namespace | detail |
| | declaration and default definition for the functions used the API
|
|
| *return An expect< void > object with | !has_error ()`. inline expect< void > success() noexcept |
| template<typename T, typename U> |
| bool | operator== (expect< T > const &lhs, expect< U > const &rhs) noexcept(noexcept(lhs.equal(rhs))) |
| template<typename T, typename U> |
| bool | operator== (expect< T > const &lhs, U const &rhs) noexcept(noexcept(lhs.equal(rhs))) |
| template<typename T, typename U> |
| bool | operator== (T const &lhs, expect< U > const &rhs) noexcept(noexcept(rhs.equal(lhs))) |
| template<typename T, typename U> |
| bool | operator!= (expect< T > const &lhs, expect< U > const &rhs) noexcept(noexcept(lhs.equal(rhs))) |
| template<typename T, typename U> |
| bool | operator!= (expect< T > const &lhs, U const &rhs) noexcept(noexcept(lhs.equal(rhs))) |
| template<typename T, typename U> |
| bool | operator!= (T const &lhs, expect< U > const &rhs) noexcept(noexcept(rhs.equal(lhs))) |
◆ MONERO_CHECK
| #define MONERO_CHECK |
( |
| ... | ) |
|
Value:do \
{ \
const ::expect<void>
result = __VA_ARGS__ ; \
} while (0)
tools::wallet2::message_signature_result_t result
Definition signature.cpp:62
Check expect<void> and return errors in current scope.
◆ MONERO_PRECOND
| #define MONERO_PRECOND |
( |
| ... | ) |
|
Value:do \
{ \
if (!( __VA_ARGS__ )) \
} while (0)
@ kInvalidArgument
A function argument is invalid.
Definition error.h:36
If precondition fails, return ::error::kInvalidArgument in current scope.
◆ MONERO_THROW
| #define MONERO_THROW |
( |
| code, |
|
|
| msg ) |
Value:
const portMappingElt code
Definition portlistingparse.c:22
static void throw_(std::error_code ec, const char *msg, const char *file, unsigned line)
Definition expect.cpp:64
◆ MONERO_UNWRAP
| #define MONERO_UNWRAP |
( |
| ... | ) |
|
Value:
static T unwrap(::expect< T > &&result, const char *error_msg, const char *file, unsigned line)
If result.has_error() call throw_. Otherwise,.
Definition expect.h:86
Get T from expect<T> by std::move as-if by function call. expect<void> returns nothing.
- Exceptions
-
| std::system_error | with expect<T>::error(), filename and line number when expect<T>::has_error() == true. |
◆ !has_error()
| *return An expect< void > object with !has_error |
( |
| ) |
|
|
noexcept |
◆ operator!=() [1/3]
template<typename
T, typename U>
◆ operator!=() [2/3]
template<typename
T, typename U>
◆ operator!=() [3/3]
template<typename
T, typename U>
◆ operator==() [1/3]
template<typename
T, typename U>
◆ operator==() [2/3]
template<typename
T, typename U>
◆ operator==() [3/3]
template<typename
T, typename U>