Error code for dumpBadVpd and generateBadVPDFile
This commit updates dumpBadVpd and generateBadVPDFileName APIs to set
error code in case of error. This helps caller of API to take action
based on the error code returned from the API.
Change-Id: Ibdfca73fa97d4061a120bd8dfe62fc2e929b88f9
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 e0d8eeb..af7620c 100644
--- a/vpd-manager/include/error_codes.hpp
+++ b/vpd-manager/include/error_codes.hpp
@@ -11,6 +11,7 @@
FILE_NOT_FOUND = 2001, /*Just a random value*/
FILE_ACCESS_ERROR,
EMPTY_FILE,
+ FILE_SYSTEM_ERROR,
// JSON exceptions
INVALID_JSON,
@@ -64,5 +65,6 @@
{error_code::ERROR_PROCESSING_SYSTEM_CMD,
"Error while executing system command tag."},
{error_code::UNSUPPORTED_VPD_TYPE, "This VPD type is not supported"},
- {error_code::STANDARD_EXCEPTION, "Standard Exception thrown"}};
+ {error_code::STANDARD_EXCEPTION, "Standard Exception thrown"},
+ {error_code::FILE_SYSTEM_ERROR, "File system error."}};
} // namespace vpd