From 0bfaaf09a8b5a55d778410a8dc58e765a7f946c8 Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Mon, 6 Jan 2025 18:11:25 +0100 Subject: [PATCH] Update error handling --- cpp/s2pexec/s2pexec_core.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/s2pexec/s2pexec_core.cpp b/cpp/s2pexec/s2pexec_core.cpp index 6431fd92..97cd5037 100644 --- a/cpp/s2pexec/s2pexec_core.cpp +++ b/cpp/s2pexec/s2pexec_core.cpp @@ -491,6 +491,10 @@ tuple S2pExec::ExecuteCommand() if (request_sense) { return executor->GetSenseData(); } + + if (status == 0x02) { + throw execution_exception("Device reported CHECK CONDITION"); + } } else { throw execution_exception(fmt::format("Can't execute command {}",