diff --git a/include/caosdb/status_code.h b/include/caosdb/status_code.h index a6fcda905284ae9dfa9b7e46c6be8da36bb32272..246a7c89d7e79937d4446416e5e2fb3736061b1c 100644 --- a/include/caosdb/status_code.h +++ b/include/caosdb/status_code.h @@ -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 &; diff --git a/src/caosdb/transaction.cpp b/src/caosdb/transaction.cpp index 61f52786f48594e3182c6101a1be305672e17def..252b5069d32d3565277656bd72b38e17293ae0dd 100644 --- a/src/caosdb/transaction.cpp +++ b/src/caosdb/transaction.cpp @@ -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) {