tools: blob: add exceptions
Add exceptions on failures where it's a clean failure path.
Change-Id: Iaa8b6c7a0914367866092a7e31899453183fd7b2
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/tools/blob_handler.hpp b/tools/blob_handler.hpp
index bcac0a8..73f0d94 100644
--- a/tools/blob_handler.hpp
+++ b/tools/blob_handler.hpp
@@ -30,6 +30,7 @@
* @param[in] command - the blob command.
* @param[in] payload - the payload bytes.
* @return the bytes returned from the ipmi interface.
+ * @throws BlobException.
*/
std::vector<std::uint8_t>
sendIpmiPayload(BlobOEMCommands command,
@@ -51,7 +52,15 @@
std::string enumerateBlob(std::uint32_t index);
std::vector<std::string> getBlobList() override;
+
+ /**
+ * @throws BlobException.
+ */
StatResponse getStat(const std::string& id) override;
+
+ /**
+ * @throws BlobException.
+ */
std::uint16_t
openBlob(const std::string& id,
blobs::FirmwareBlobHandler::UpdateFlags handlerFlags) override;