From e1c9be86a878bab2792c58733e0515bfb46ef0b1 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Wed, 1 Nov 2017 13:58:43 +0900 Subject: [PATCH] Return error code when the recovery file is unknown type Change-Id: If712388b238ee15c8ce562885c84ad23829d2d75 Signed-off-by: Sangyoon Jang --- src/common/step/recovery/step_open_recovery_file.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/step/recovery/step_open_recovery_file.cc b/src/common/step/recovery/step_open_recovery_file.cc index 49aeea1..aa3a58b 100644 --- a/src/common/step/recovery/step_open_recovery_file.cc +++ b/src/common/step/recovery/step_open_recovery_file.cc @@ -39,7 +39,9 @@ Step::Status StepOpenRecoveryFile::process() { LOG(INFO) << "Running recovery for mount update installation"; break; default: - assert(false && "Not reached"); + LOG(ERROR) << context_->file_path.get() << " is unknown recovery type (" + << recovery_file->type() << ")"; + return Status::RECOVERY_ERROR; } context_->recovery_info.set(RecoveryInfo(std::move(recovery_file))); -- 2.7.4