Error handling for isPass1Planar API
This commit updates isPass1Planar API 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: I3823e749d68e37f9d004b9f95c80693d1f7c5b41
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 91a16bc..b602fa7 100644
--- a/vpd-manager/include/error_codes.hpp
+++ b/vpd-manager/include/error_codes.hpp
@@ -39,7 +39,8 @@
KEYWORD_NOT_FOUND,
OUT_OF_BOUND_EXCEPTION,
FAILED_TO_DETECT_LOCATION_CODE_TYPE,
- RECEIVED_INVALID_KWD_TYPE_FROM_DBUS
+ RECEIVED_INVALID_KWD_TYPE_FROM_DBUS,
+ INVALID_KEYWORD_LENGTH
};
const std::unordered_map<int, std::string> errorCodeMap = {
@@ -74,6 +75,7 @@
{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."},
+ {error_code::INVALID_KEYWORD_LENGTH, "Invalid keyword length."},
{error_code::FAILED_TO_DETECT_LOCATION_CODE_TYPE,
"Failed to detect location code type"},
{error_code::DBUS_FAILURE, "Dbus call failed"},