Print the ErrorCode name when DeltaPerformer fails.
Bug: 29163155
TEST=Failed hash verification error now prints the ErrorCode name.
Change-Id: If7c3c49419124818c86f96ec423947e6ce90e8c0
diff --git a/payload_consumer/download_action.cc b/payload_consumer/download_action.cc
index fdbbd72..084848e 100644
--- a/payload_consumer/download_action.cc
+++ b/payload_consumer/download_action.cc
@@ -27,6 +27,7 @@
#include "update_engine/common/action_pipe.h"
#include "update_engine/common/boot_control_interface.h"
+#include "update_engine/common/error_code_utils.h"
#include "update_engine/common/utils.h"
#include "update_engine/omaha_request_params.h"
#include "update_engine/p2p_manager.h"
@@ -270,7 +271,8 @@
length, bytes_received_, install_plan_.payload_size);
}
if (writer_ && !writer_->Write(bytes, length, &code_)) {
- LOG(ERROR) << "Error " << code_ << " in DeltaPerformer's Write method when "
+ LOG(ERROR) << "Error " << utils::ErrorCodeToString(code_) << " (" << code_
+ << ") in DeltaPerformer's Write method when "
<< "processing the received payload -- Terminating processing";
// Delete p2p file, if applicable.
if (!p2p_file_id_.empty())