LuciadCPillar 2023.1.05
luciad::ErrorInfo Class Referencefinal

This class exposes details for a failed method call. More...

#include <luciad/ErrorInfo.h>

Public Member Functions

 ErrorInfo (ErrorCode errorCode, const std::string &message="")
 Constructs error info using an error code and a message. More...
 
 ErrorInfo (std::error_code errorCode, const std::string &message="")
 Constructs error info using an error code and a message. More...
 
std::error_code getErrorCode () const
 Returns the error's code. More...
 
const std::string & getMessage () const
 Returns the error's message. More...
 
bool operator!= (const std::error_code &errorCode) const
 
bool operator!= (const std::error_condition &errorCondition) const
 
bool operator== (const std::error_code &errorCode) const
 Enables the ErrorInfo to be compared against an std::error_code. More...
 
bool operator== (const std::error_condition &errorCondition) const
 

Detailed Description

This class exposes details for a failed method call.

It contains :

  • An error message explaining why the call failed.
  • An error code (see std::error_code).

Related article: Error handling conventions used in the API The exception type depends on the context of the call, please refer to the related documentation.

Constructor & Destructor Documentation

◆ ErrorInfo() [1/2]

luciad::ErrorInfo::ErrorInfo ( std::error_code  errorCode,
const std::string &  message = "" 
)
inlineexplicit

Constructs error info using an error code and a message.

Parameters
errorCodeThe error's code.
messageThe error's message.

◆ ErrorInfo() [2/2]

luciad::ErrorInfo::ErrorInfo ( ErrorCode  errorCode,
const std::string &  message = "" 
)
inlineexplicit

Constructs error info using an error code and a message.

Parameters
errorCodeThe error's code.
messageThe error's message.

Member Function Documentation

◆ getErrorCode()

std::error_code luciad::ErrorInfo::getErrorCode ( ) const
inline

Returns the error's code.

Returns
the error's code.

◆ getMessage()

const std::string & luciad::ErrorInfo::getMessage ( ) const
inline

Returns the error's message.

Returns
the error's message.

◆ operator!=() [1/2]

bool luciad::ErrorInfo::operator!= ( const std::error_code &  errorCode) const
inline

◆ operator!=() [2/2]

bool luciad::ErrorInfo::operator!= ( const std::error_condition &  errorCondition) const
inline

◆ operator==() [1/2]

bool luciad::ErrorInfo::operator== ( const std::error_code &  errorCode) const
inline

Enables the ErrorInfo to be compared against an std::error_code.

◆ operator==() [2/2]

bool luciad::ErrorInfo::operator== ( const std::error_condition &  errorCondition) const
inline