Improve error message when file for tag value not found

This commit is contained in:
Martchus 2021-08-14 14:23:08 +02:00
parent 60187d54c8
commit 33b346fb7e
1 changed files with 3 additions and 3 deletions

View File

@ -730,10 +730,10 @@ void setTagInfo(const SetTagInfoArgs &args)
convertedValues.emplace_back(std::move(value));
}
} catch (const TagParser::Failure &) {
diag.emplace_back(DiagLevel::Critical, "Unable to parse specified file.", context);
diag.emplace_back(DiagLevel::Critical, argsToString("Unable to parse specified file \"", path, "\"."), context);
} catch (const std::ios_base::failure &e) {
diag.emplace_back(
DiagLevel::Critical, argsToString("An IO error occurred when parsing the specified file: ", e.what()), context);
diag.emplace_back(DiagLevel::Critical,
argsToString("An IO error occurred when parsing the specified file \"", path, "\": ", e.what()), context);
}
}
// finally set the values