Skip to content
Snippets Groups Projects
Commit e810278b authored by florian's avatar florian
Browse files

ENH: Add status code for wrong void pointer assignment

parent 473e5532
No related branches found
No related tags found
3 merge requests!12F consolidation,!9Draft: API: remove UniqueResult, lower-case at, size for ResultSet,!8ENH: Add retrieval and queries to Extern C interface
This commit is part of merge request !8. Comments created here will be created in the context of that merge request.
......@@ -52,6 +52,7 @@ enum StatusCode {
TRANSACTION_TYPE_ERROR = 26,
UNSUPPORTED_FEATURE = 27,
ORIGINAL_ENTITY_MISSING_ID = 28,
EXTERN_C_ASSIGNMENT_ERROR = 29,
};
auto get_status_description(int code) -> const std::string &;
......
......@@ -80,7 +80,10 @@ auto get_status_description(int code) -> const std::string & {
"an id. This is the case when you did not retrieve it before applying any "
"changes and instantiated the Entity class explicitely."},
{StatusCode::UNSUPPORTED_FEATURE,
"This feature is not available in the this client implementation."}};
"This feature is not available in the this client implementation."},
{StatusCode::EXTERN_C_ASSIGNMENT_ERROR,
"You tried to assign a new object to the wrapped void pointer. You have "
"to delete the old pointee first."}};
try {
return descriptions.at(code);
} catch (const std::out_of_range &exc) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment