Update error messages

This commit is contained in:
Uwe Seimet 2023-11-15 18:00:40 +01:00
parent 81f25dc180
commit 3b9affc934
2 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ bool ScsiExecutor::Execute(const string& filename, bool binary, string& result)
if (!binary) {
ifstream in(filename);
if (in.fail()) {
result = "Error opening JSON input file '" + filename + "'";
result = "Can't open JSON input file '" + filename + "'";
return false;
}
@ -43,7 +43,7 @@ bool ScsiExecutor::Execute(const string& filename, bool binary, string& result)
else {
ifstream in(filename, ios::binary);
if (in.fail()) {
result = "Error opening binary input file '" + filename + "'";
result = "Can't open binary input file '" + filename + "'";
return false;
}
@ -70,7 +70,7 @@ bool ScsiExecutor::Execute(const string& filename, bool binary, string& result)
else {
PbResult r;
if (!r.ParseFromArray(buffer.data(), length)) {
result = "Error parsing binary protobuf data";
result = "Can't parse received binary protobuf data";
return false;
}
google::protobuf::util::MessageToJsonString(r, &result);

View File

@ -162,7 +162,7 @@ int ScsiExec::run(span<char*> args, bool in_process)
cout << result << '\n' << flush;
}
else {
cerr << result << endl;
cerr << "Error: " << result << endl;
}
CleanUp();