Improve error message when trying to assign attachments to format not supporting it

See https://github.com/Martchus/tageditor/issues/74
This commit is contained in:
Martchus 2021-09-24 21:54:22 +02:00
parent 8496cc079c
commit 43ebafe6dc
2 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,7 @@ set(META_GUI_OPTIONAL true)
set(META_JS_SRC_DIR renamingutility)
set(META_VERSION_MAJOR 3)
set(META_VERSION_MINOR 5)
set(META_VERSION_PATCH 0)
set(META_VERSION_PATCH 1)
set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)
# add project files

View File

@ -853,6 +853,9 @@ void setTagInfo(const SetTagInfoArgs &args)
}
attachmentsModified |= currentInfo.next(container, diag);
}
} else if (fileInfo.attachmentsParsingStatus() == ParsingStatus::NotSupported) {
diag.emplace_back(
DiagLevel::Critical, "Unable to assign attachments because that is not supported for the file's format.", attachmentsContext);
} else {
diag.emplace_back(DiagLevel::Critical, "Unable to assign attachments because the container object has not been initialized.",
attachmentsContext);