Hyper API for C++  0.0.16638
Hyper client library for C++ applications
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. More...
 
const char * getHint () const noexcept
 Returns the hint message stored in the exception object, or "" if there is none.
 
const char * getMessage () const noexcept
 Returns the message stored in the exception object, or "" if there is none. More...
 
const char * getHintMessage () const noexcept
 Returns the hint message stored in the exception object, or "" if there is none. More...
 
 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. More...
 
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

◆ getHintMessage()

const char* hyperapi::HyperException::getHintMessage ( ) 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 80 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.

◆ getMessage()

const char* hyperapi::HyperException::getMessage ( ) 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 69 of file HyperException.hpp.

◆ HYPER_DEPRECATED()

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.


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