Electroneum
error.h File Reference
#include <system_error>
#include <type_traits>
Include dependency graph for error.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  std::is_error_code_enum<::common_error >
 

Enumerations

enum  common_error : int { common_error::kInvalidArgument = 1, common_error::kInvalidErrorCode }
 

Functions

std::error_category const & common_category () noexcept
 
std::error_code make_error_code (::common_error value) noexcept
 

Enumeration Type Documentation

◆ common_error

enum common_error : int
strong
Enumerator
kInvalidArgument 

A function argument is invalid.

kInvalidErrorCode 

Default std::error_code given to expect<T>

Definition at line 32 of file error.h.

32  : int
33 {
34  // 0 is reserved for no error, as per expect<T>
35  kInvalidArgument = 1,
37 };
A function argument is invalid.
Default std::error_code given to expect<T>

Function Documentation

◆ common_category()

std::error_category const& common_category ( )
noexcept

Definition at line 70 of file error.cpp.

71 {
72  static const category instance{};
73  return instance;
74 }
Here is the caller graph for this function:

◆ make_error_code()

std::error_code make_error_code ( ::common_error  value)
inlinenoexcept

Definition at line 41 of file error.h.

42 {
43  return std::error_code{int(value), common_category()};
44 }
std::error_category const & common_category() noexcept
Definition: error.cpp:70
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225
Here is the call graph for this function:
Here is the caller graph for this function: