Skip to content

Commit 4e41eb9

Browse files
authored
collections.jinja2: improve exception message for untracked relation (#728)
* collections.jinja2: improve exception message for untracked relation * mention name in the message
1 parent 4291447 commit 4e41eb9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

python/templates/macros/collections.jinja2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ std::vector<{{ member.full_type }}> {{ class.bare_type }}Collection::{{ member.n
2929
{{ _relation_index_handling(relation) }}
3030
for (const auto& it : (*m_rel_{{ relation.name }}_tmp[i])) {
3131
if (it.getObjectID().index == podio::ObjectID::untracked) {
32-
throw std::runtime_error("Trying to persistify untracked object");
32+
throw std::runtime_error("Trying to persistify relation \"{{ relation.name }}\" that points to untracked object");
3333
}
3434
m_refCollections[{{ index }}]->emplace_back(it.getObjectID());
3535
}
@@ -48,7 +48,7 @@ std::vector<{{ member.full_type }}> {{ class.bare_type }}Collection::{{ member.n
4848
if (obj->m_{{ relation.name }}) {
4949
m_refCollections[{{ real_index }}]->emplace_back(obj->m_{{ relation.name }}->getObjectID());
5050
} else {
51-
m_refCollections[{{ real_index }}]->push_back({podio::ObjectID::invalid, 0});
51+
m_refCollections[{{ real_index }}]->push_back({podio::ObjectID::invalid, 0});
5252
}
5353
}
5454
{% endmacro %}

0 commit comments

Comments
 (0)