Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update error handling
Browse files Browse the repository at this point in the history
uweseimet committed Jan 6, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 6418d28 commit 0bfaaf0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpp/s2pexec/s2pexec_core.cpp
Original file line number Diff line number Diff line change
@@ -491,6 +491,10 @@ tuple<SenseKey, Asc, int> 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 {}",

0 comments on commit 0bfaaf0

Please sign in to comment.