diff --git a/modules/io/src/mol/mmcif_writer.cc b/modules/io/src/mol/mmcif_writer.cc
index 785c3aabe8862b9dc27eda3882d0bc740944a794..d682b13ff7fa5954cba79e3d0aef5562e6edecd5 100644
--- a/modules/io/src/mol/mmcif_writer.cc
+++ b/modules/io/src/mol/mmcif_writer.cc
@@ -1263,8 +1263,11 @@ namespace {
           Feed_atom_site(atom_site, chain_name, entity_id, entity_info[entity_id],
                          tmp);
         } else {
-          // TODO: make error message more insightful...
-          throw ost::io::IOException("Unsupported chem class...");
+          // this should not happen...
+          std::stringstream ss;
+          ss << "Unsupported chem class (" << res.GetChemClass();
+          ss << ") for residue "<< res;
+          throw ost::io::IOException(ss.str());
         }
       }