Skip to content

Commit

Permalink
Improve error message for push_back when using an immutable type
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Apr 9, 2024
1 parent b94cc63 commit e7501b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/templates/Collection.cc.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void {{ collection_type }}::push_back(Mutable{{ class.bare_type }} object) {

void {{ collection_type }}::push_back({{ class.bare_type }} object) {
if (!m_isSubsetColl) {
throw std::invalid_argument("Can only add immutable objects to subset collections");
throw std::invalid_argument("Immutable objects can only be added to subset collections");
}
auto obj = object.m_obj;
if (obj->id.index < 0) {
Expand Down

0 comments on commit e7501b8

Please sign in to comment.