purify
C++ Purify implementation with native circuit and BPP support
Loading...
Searching...
No Matches
purify::Error Struct Reference

Compact error object returned by checked APIs. More...

#include <error.hpp>

Public Member Functions

constexpr ErrorCategory category () const noexcept
 
constexpr std::string_view name () const noexcept
 
constexpr std::string_view message () const noexcept
 
constexpr bool is_natural () const noexcept
 
constexpr bool is_usage_error () const noexcept
 
constexpr bool is_internal () const noexcept
 
constexpr auto operator<=> (const Error &) const =default
 

Data Fields

ErrorCode code {}
 

Detailed Description

Definition at line 75 of file error.hpp.

Member Function Documentation

◆ category()

constexpr ErrorCategory purify::Error::category ( ) const
inlineconstexprnoexcept

Definition at line 306 of file error.hpp.

References code, and purify::error_category().

Referenced by is_internal(), is_natural(), and is_usage_error().

◆ is_internal()

constexpr bool purify::Error::is_internal ( ) const
inlineconstexprnoexcept

Definition at line 90 of file error.hpp.

References category(), and purify::Internal.

◆ is_natural()

constexpr bool purify::Error::is_natural ( ) const
inlineconstexprnoexcept

Definition at line 82 of file error.hpp.

References category(), and purify::Natural.

◆ is_usage_error()

constexpr bool purify::Error::is_usage_error ( ) const
inlineconstexprnoexcept

Definition at line 86 of file error.hpp.

References category(), and purify::Usage.

◆ message()

constexpr std::string_view purify::Error::message ( ) const
inlineconstexprnoexcept

Definition at line 314 of file error.hpp.

References code, and purify::error_message().

◆ name()

constexpr std::string_view purify::Error::name ( ) const
inlineconstexprnoexcept

Definition at line 310 of file error.hpp.

References code, and purify::to_string().

◆ operator<=>()

constexpr auto purify::Error::operator<=> ( const Error ) const
constexprdefault

Field Documentation

◆ code

ErrorCode purify::Error::code {}

Definition at line 76 of file error.hpp.

Referenced by category(), message(), and name().


The documentation for this struct was generated from the following file: