6#include <boost/preprocessor/cat.hpp>
30 UnknownError, SyscallFailure, MaxErrorNum);
35#define TRYE_IMPL(val, e, ident) \
37 const auto& ident = val; \
38 if (!ident.has_value()) { \
39 using enum ErrorKind; \
45#define TRY_IMPL(val, ident) TRYE_IMPL(val, ident.error(), ident)
48#define TRYE(val, e) TRYE_IMPL(val, e, BOOST_PP_CAT(errref_uniq__, __COUNTER__))
52#define TRY(val) TRY_IMPL(val, BOOST_PP_CAT(errrefe_uniq__, __COUNTER__))
std::variant wrapper for a partial implementation of C++23's expected type
Definition expected.hpp:34
Definition asm_buffer.hpp:20
ErrorKind
Definition error_types.hpp:11
@ UnexpectedReturn
A function returned happened due to an unexpected condition.
@ UnresolvedSymbol
Failed to resolve a named symbol in a program.
@ SyscallPredSat
The syscall predicate passed to Tracer::run_until was satisfied.
@ TimedOut
Program / operation surpassed maximum timeout (gennerally specified)
@ UnknownError
As named; use this as little as possible.
@ SyscallFailure
A Linux syscall failed.
@ BadArgument
Bad argument to an AsmFunction. For an unwrappable type with no inner value.