Error Code
This enum class defines the error codes returned by HOOPS Solve, Access & Mesh API functions. These codes indicate the type of error that occurred during function execution.
All API functions return a Status object, which contains an ErrorCode. A successful operation returns NONE.
Error Code Values
The ErrorCode enum defines the following error codes:
-
enum class
cae::core::ErrorCode Error codes returned by API functions.
Values:
-
enumerator
NONE No error.
-
enumerator
VALUE Invalid value.
-
enumerator
ENUM Invalid enumeration.
-
enumerator
OBJECTTYPE Invalid object type.
-
enumerator
MEMORY Memory allocation error.
-
enumerator
NULLOBJECT Null object reference.
-
enumerator
FILE File operation error.
-
enumerator
COMPUTE Computation error.
-
enumerator
OPERATION Invalid operation.
-
enumerator
OVERFLOWERR Overflow error.
-
enumerator
UNDERFLOWERR Underflow error.
-
enumerator
UNKNOWN Unknown error.
-
enumerator
FORMAT Format error.
-
enumerator
LOAD Load error.
-
enumerator
SEVERE Severe error.
-
enumerator
LICENSE License error.
-
enumerator
Usage
To check for errors after calling an API function:
cae::core::InteractionPair pair;
auto status = pair.setType(cae::core::InteractionPair::Type::CONTACT);
if (status.getErrorCode() != cae::core::ErrorCode::NONE) {
// Handle error
std::cerr << "Error occurred: " << static_cast<int>(status.getErrorCode()) << std::endl;
}