Improve error handling when setting tags in CLI
This commit is contained in:
parent
04a09c025c
commit
08629ef4ee
|
@ -782,8 +782,10 @@ void setTagInfo(const SetTagInfoArgs &args)
|
||||||
}
|
}
|
||||||
// finally set the values
|
// finally set the values
|
||||||
try {
|
try {
|
||||||
if (!convertedValues.empty() || convertedId3v2CoverValues.empty()) {
|
if ((!convertedValues.empty() || convertedId3v2CoverValues.empty())
|
||||||
denotedScope.field.setValues(tag, tagType, convertedValues);
|
&& !denotedScope.field.setValues(tag, tagType, convertedValues)) {
|
||||||
|
diag.emplace_back(DiagLevel::Critical,
|
||||||
|
argsToString("Unable set field \"", denotedScope.field.name(), "\": setting field is not supported"), context);
|
||||||
}
|
}
|
||||||
} catch (const ConversionException &e) {
|
} catch (const ConversionException &e) {
|
||||||
diag.emplace_back(DiagLevel::Critical,
|
diag.emplace_back(DiagLevel::Critical,
|
||||||
|
|
Loading…
Reference in New Issue