LIEF: Library to Instrument Executable Formats Version 0.15.1
|
#include <cstdint>
#include <LIEF/third-party/expected.hpp>
Go to the source code of this file.
Classes | |
struct | LIEF::ok_t |
Opaque structure used by ok_error_t. More... | |
Namespaces | |
namespace | LIEF |
LIEF namespace. | |
Typedefs | |
template<typename T > | |
using | LIEF::result = tl::expected<T, lief_errors> |
Wrapper that contains an Object (T ) or an error. | |
using | LIEF::ok_error_t = result<ok_t> |
Opaque structure that is used by LIEF to avoid writing result<void> f(...) . Instead, it makes the output explicit such as: | |
Enumerations | |
enum class | lief_errors : uint32_t { read_error = 1 , not_found , not_implemented , not_supported , corrupted , conversion_error , read_out_of_bound , asn1_bad_tag , file_error , file_format_error , parsing_error , build_error , data_too_large } |
LIEF error codes definition. More... | |
Functions | |
const char * | to_string (lief_errors err) |
tl::unexpected< lief_errors > | make_error_code (lief_errors e) |
Create an standard error code from lief_errors. | |
template<class T > | |
lief_errors | LIEF::get_error (result< T > &err) |
Get the error code associated with the result. | |
template<class T > | |
lief_errors | LIEF::as_lief_err (result< T > &err) |
Return the lief_errors when the provided result<T> is an error. | |
ok_t | LIEF::ok () |
Return success for function with return type ok_error_t. | |
bool | LIEF::is_ok (const ok_error_t &val) |
bool | LIEF::is_err (const ok_error_t &val) |
|
strong |
LIEF error codes definition.
Enumerator | |
---|---|
read_error | |
not_found | |
not_implemented | |
not_supported | |
corrupted | |
conversion_error | |
read_out_of_bound | |
asn1_bad_tag | |
file_error | |
file_format_error | |
parsing_error | |
build_error | |
data_too_large |
|
inline |
Create an standard error code from lief_errors.
Referenced by LIEF::BinaryStream::peek(), LIEF::BinaryStream::peek_conv(), LIEF::BinaryStream::peek_data(), LIEF::BinaryStream::read_data(), LIEF::SpanStream::slice(), LIEF::SpanStream::slice(), and LIEF::SpanStream::~SpanStream().
const char * to_string | ( | lief_errors | err | ) |