Update error handling

This commit is contained in:
Uwe Seimet 2023-11-15 18:02:12 +01:00
parent 3b9affc934
commit 5e761730f3
1 changed files with 2 additions and 2 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 = "Can't open JSON input file '" + filename + "'";
result = "Can't open JSON input file '" + filename + "'" + strerror(errno);
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 = "Can't open binary input file '" + filename + "'";
result = "Can't open binary input file '" + filename + "': " + strerror(errno);
return false;
}