Electroneum
Loading...
Searching...
No Matches
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 >

Namespaces

namespace  std
 STL namespace.

Enumerations

enum class  common_error : int { kInvalidArgument = 1 , 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 class 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.

33{
34 // 0 is reserved for no error, as per expect<T>
37};
@ kInvalidArgument
A function argument is invalid.
Definition error.h:35
@ kInvalidErrorCode
Default std::error_code given to expect<T>.
Definition error.h:36

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}
const GenericPointer< typename T::ValueType > T2 value
Definition pointer.h:1225
std::error_category const & common_category() noexcept
Definition error.cpp:70
Here is the call graph for this function:
Here is the caller graph for this function: