From e82b4beaf62ad11f82f7f6cd0a61e922c205bd39 Mon Sep 17 00:00:00 2001
From: Xavier Robin <xavier.robin@unibas.ch>
Date: Thu, 7 Dec 2023 13:46:30 +0100
Subject: [PATCH] logging: SCHWED-6088 give more details about the problem

---
 modules/io/src/mol/mmcif_reader.cc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/io/src/mol/mmcif_reader.cc b/modules/io/src/mol/mmcif_reader.cc
index 0fa4516c4..b6c2167cb 100644
--- a/modules/io/src/mol/mmcif_reader.cc
+++ b/modules/io/src/mol/mmcif_reader.cc
@@ -551,6 +551,10 @@ void MMCifReader::ParseAndAddAtom(const std::vector<StringRef>& columns)
       // and the auth_seq_id or pdbx_PDB_ins_code were missing.
       // There may be more elegant ways to detect that we crossed to a new
       // residue that don't rely on auth_seq_id/pdbx_PDB_ins_code.
+      LOG_WARNING("_atom_site.label_seq_id is invalid for " <<
+        "residue '" << res_name << "' in chain '" << cif_chain_name <<
+        "' and _atom_site.auth_seq_id or _atom_site.pdbx_PDB_ins_code " <<
+        "are missing.");
       throw IOException(this->FormatDiagnostic(STAR_DIAG_ERROR,
                                            "Missing residue number information",
                                                this->GetCurrentLinenum()));
@@ -569,6 +573,10 @@ void MMCifReader::ParseAndAddAtom(const std::vector<StringRef>& columns)
                         columns[indices_[PDBX_PDB_INS_CODE]].str();
       }
     } else {
+      LOG_WARNING("_atom_site.label_seq_id is invalid for " <<
+        "residue '" << res_name << "' in chain '" << cif_chain_name <<
+        "' and _atom_site.auth_seq_id or _atom_site.pdbx_PDB_ins_code " <<
+        "are missing.");
       throw IOException(this->FormatDiagnostic(STAR_DIAG_ERROR,
                                            "Missing residue number information",
                                                this->GetCurrentLinenum()));
-- 
GitLab