Skip to content
Snippets Groups Projects
Unverified Commit c3a3a7f9 authored by Xavier Robin's avatar Xavier Robin
Browse files

fix: only read multiple data blocks in fault_tolerant mode

parent 532f5b41
No related branches found
No related tags found
No related merge requests found
......@@ -99,6 +99,18 @@ bool MMCifReader::OnBeginData(const StringRef& data_name)
{
LOG_DEBUG("MCIFFReader: " << profile_);
Profile profile_import("MMCifReader::OnBeginData");
if (chain_count_ > 0) {
std::stringstream ss;
ss << "Can only read one data block. Found second one 'data_" << data_name << "'.";
if (profile_.fault_tolerant) {
LOG_WARNING(ss.str());
} else {
throw IOException(this->FormatDiagnostic(STAR_DIAG_ERROR,
ss.str(),
this->GetCurrentLinenum()));
}
}
// IDs in mmCIF files can be any string, so no restrictions here
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment