Hyper API for C++ 0.0.18825
Hyper client library for C++ applications
Loading...
Searching...
No Matches
hyperapi::HyperException Class Referencefinal

Defines an exception object that is thrown on failure by the functions in the Hyper API C++ library. More...

#include <HyperException.hpp>

Inheritance diagram for hyperapi::HyperException:

Public Member Functions

HyperExceptionoperator= (const HyperException &other) noexcept
 Copy assignment operator.
 
 HyperException (const HyperException &other) noexcept
 Copy constructor.
 
HyperExceptionoperator= (HyperException &&other)=default
 Move assignment operator.
 
 HyperException (HyperException &&other)=default
 Move constructor.
 
const char * getMainMessage () const noexcept
 Returns the message stored in the exception object, or "" if there is none.
 
const char * getHint () const noexcept
 Returns the hint message stored in the exception object, or "" if there is none.
 
 HYPER_DEPRECATED ("Use getMainMessage() instead. This function will be removed in the future.") const char *getMessage() const noexcept
 Returns the message stored in the exception object, or "" if there is none.
 
 HYPER_DEPRECATED ("Use getHint() instead. This function will be removed in the future.") const char *getHintMessage() const noexcept
 Returns the hint message stored in the exception object, or "" if there is none.
 
 HYPER_DEPRECATED ("Use getCause().has_value() instead. This function will be removed in the future.") bool hasCause() const noexcept
 Returns whether this error has an underlying cause stored.
 
optional< HyperExceptiongetCause () const noexcept
 Returns the cause stored in the exception object.
 
ContextId getContextId () const noexcept
 Returns the context id.
 
std::string toString () const
 Returns a formatted string containing the message and hint of the error and all causes.
 
const char * what () const noexcept override
 Returns a null terminated character sequence that may be used to identify the exception.
 

Detailed Description

Member Function Documentation

◆ getContextId()

ContextId hyperapi::HyperException::getContextId ( ) const
inlinenoexcept

Returns the context id.

Definition at line 100 of file HyperException.hpp.

◆ getHint()

const char * hyperapi::HyperException::getHint ( ) const
inlinenoexcept

Returns the hint message stored in the exception object, or "" if there is none.

Definition at line 60 of file HyperException.hpp.

◆ getMainMessage()

const char * hyperapi::HyperException::getMainMessage ( ) const
inlinenoexcept

Returns the message stored in the exception object, or "" if there is none.

Error messages may change between HAPI versions.

Definition at line 55 of file HyperException.hpp.

◆ HYPER_DEPRECATED() [1/3]

hyperapi::HyperException::HYPER_DEPRECATED ( "Use getCause().has_value() instead. This function will be removed in the future."  ) const
inlinenoexcept

Returns whether this error has an underlying cause stored.

Deprecated:
Use getCause().has_value() instead. This function will be removed in the future.

Definition at line 89 of file HyperException.hpp.

◆ HYPER_DEPRECATED() [2/3]

hyperapi::HyperException::HYPER_DEPRECATED ( "Use getHint() instead. This function will be removed in the future."  ) const
inlinenoexcept

Returns the hint message stored in the exception object, or "" if there is none.

Deprecated:
Use getHint() instead. This function will be removed in the future.

Definition at line 78 of file HyperException.hpp.

◆ HYPER_DEPRECATED() [3/3]

hyperapi::HyperException::HYPER_DEPRECATED ( "Use getMainMessage() instead. This function will be removed in the future."  ) const
inlinenoexcept

Returns the message stored in the exception object, or "" if there is none.

Error messages may change between HAPI versions.

Deprecated:
Use getMainMessage() instead. This function will be removed in the future.

Definition at line 67 of file HyperException.hpp.


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