From a8039a482fc74b03b571ec61ad13f5c74b5f0ed2 Mon Sep 17 00:00:00 2001 From: florian <f.spreckelsen@inidscale.com> Date: Wed, 18 Aug 2021 13:11:28 +0200 Subject: [PATCH] ENH: Add status code for key errors --- include/caosdb/status_code.h | 1 + src/caosdb/transaction.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/caosdb/status_code.h b/include/caosdb/status_code.h index 573b126..5689b9e 100644 --- a/include/caosdb/status_code.h +++ b/include/caosdb/status_code.h @@ -61,6 +61,7 @@ enum StatusCode { FILE_DOES_NOT_EXIST_LOCALLY = 34, FILE_UPLOAD_ERROR = 35, FILE_DOWNLOAD_ERROR = 36, + ENUM_MAPPING_ERROR = 37, OTHER_CLIENT_ERROR = 9999, }; diff --git a/src/caosdb/transaction.cpp b/src/caosdb/transaction.cpp index ac64e26..ae80cc7 100644 --- a/src/caosdb/transaction.cpp +++ b/src/caosdb/transaction.cpp @@ -102,6 +102,8 @@ auto get_status_description(int code) -> const std::string & { {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."}, + {StatusCode::ENUM_MAPPING_ERROR, + "The role, importance, or datatype you specified does not exist."}, {StatusCode::OTHER_CLIENT_ERROR, "This is code is reserved to errors raised by other clients wrapping the " "C++ client (or its Extern C interface). This should never occur when " -- GitLab