tools: Reduce cleanup logging output
We don't need all 3 lines to print, 1 should be sufficient information.
Change-Id: I8034d3a90eee0e2e06377527abd176bd3249a942
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/tools/handler.cpp b/tools/handler.cpp
index 293c4e6..a87793e 100644
--- a/tools/handler.cpp
+++ b/tools/handler.cpp
@@ -158,18 +158,17 @@
/* Errors aren't important for this call. */
try
{
- std::fprintf(stderr, "Opening the cleanup blob\n");
+ std::fprintf(stderr, "Executing cleanup blob\n");
auto session =
openBlob(blob, ipmi_flash::cleanupBlobId,
static_cast<std::uint16_t>(
ipmi_flash::FirmwareFlags::UpdateFlags::openWrite));
-
- std::fprintf(stderr, "Committing to the cleanup blob\n");
blob->commit(*session, {});
- std::fprintf(stderr, "Closing cleanup blob\n");
}
- catch (...)
- {}
+ catch (const std::exception& e)
+ {
+ std::fprintf(stderr, "Cleanup failed: %s\n", e.what());
+ }
}
} // namespace host_tool