Error code for encodeKeyword API
This commit updates encodeKeyword APIs to set error code in case of
error. This helps the caller of API to take action based on the error
code returned from the API.
Change-Id: I0cba6191d2ec6ded8e793514086f3e62218cf893
Signed-off-by: Rekha Aparna <vrekhaaparna@ibm.com>
diff --git a/vpd-manager/include/error_codes.hpp b/vpd-manager/include/error_codes.hpp
index 0ac08aa..2f4ccd5 100644
--- a/vpd-manager/include/error_codes.hpp
+++ b/vpd-manager/include/error_codes.hpp
@@ -35,7 +35,8 @@
// VPD specific errors
UNSUPPORTED_VPD_TYPE,
- KEYWORD_NOT_FOUND
+ KEYWORD_NOT_FOUND,
+ OUT_OF_BOUND_EXCEPTION
};
const std::unordered_map<int, std::string> errorCodeMap = {
@@ -66,6 +67,7 @@
{error_code::ERROR_PROCESSING_SYSTEM_CMD,
"Error while executing system command tag."},
{error_code::KEYWORD_NOT_FOUND, "Keyword not found"},
+ {error_code::OUT_OF_BOUND_EXCEPTION, "Out of bound error"},
{error_code::UNSUPPORTED_VPD_TYPE, "This VPD type is not supported"},
{error_code::STANDARD_EXCEPTION, "Standard Exception thrown"},
{error_code::FILE_SYSTEM_ERROR, "File system error."}};