Archicad 28 C++ API
Loading...
Searching...
No Matches
ACAPI::Error Struct Reference

Error type for ACAPI::Result containing an error message and an error code. More...

#include <Result.hpp>

Public Member Functions

 Error (GSErrCode kind, const std::string &text)
 Construct a new Error instance.
 
 Error (GSErrCode kind, const std::string_view text)
 Construct a new Error instance.
 
 Error (GSErrCode kind, std::string &&text)
 Construct a new Error instance.
 
 Error (GSErrCode kind, const char *text)
 Construct a new Error instance.
 
bool operator== (const Error &rhs) const
 Comparison operator.
 

Detailed Description

Error type for ACAPI::Result containing an error message and an error code.

Constructor & Destructor Documentation

◆ Error() [1/4]

ACAPI::Error::Error ( GSErrCode  kind,
const std::string &  text 
)
inline

Construct a new Error instance.

Parameters
kindError code.
textDetailed description of the error.

◆ Error() [2/4]

ACAPI::Error::Error ( GSErrCode  kind,
const std::string_view  text 
)
inline

Construct a new Error instance.

Parameters
kindError code.
textDetailed description of the error.

◆ Error() [3/4]

ACAPI::Error::Error ( GSErrCode  kind,
std::string &&  text 
)
inline

Construct a new Error instance.

Parameters
kindError code.
textDetailed description of the error.

◆ Error() [4/4]

ACAPI::Error::Error ( GSErrCode  kind,
const char *  text 
)
inline

Construct a new Error instance.

Parameters
kindError code.
textDetailed description of the error.

Member Function Documentation

◆ operator==()

bool ACAPI::Error::operator== ( const Error rhs) const
inline

Comparison operator.

Parameters
rhsThe other instance to compare.
Returns
True if the two instances are equal, otherwise false.