diff --git a/atrip.org b/atrip.org index 7333180..1e1f95f 100644 --- a/atrip.org +++ b/atrip.org @@ -1453,8 +1453,11 @@ namespace atrip { [&name](SliceUnion const* s) { return name == s->name; }); - if (sliceUnionIt == unions.end()) - throw std::domain_error("SliceUnion not found!"); + if (sliceUnionIt == unions.end()) { + std::stringstream stream; + stream << "SliceUnion(" << name << ") not found!"; + throw std::domain_error(stream.str()); + } return **sliceUnionIt; } diff --git a/include/atrip/SliceUnion.hpp b/include/atrip/SliceUnion.hpp index 7c29cf7..8625afc 100644 --- a/include/atrip/SliceUnion.hpp +++ b/include/atrip/SliceUnion.hpp @@ -552,8 +552,11 @@ namespace atrip { [&name](SliceUnion const* s) { return name == s->name; }); - if (sliceUnionIt == unions.end()) - throw std::domain_error("SliceUnion not found!"); + if (sliceUnionIt == unions.end()) { + std::stringstream stream; + stream << "SliceUnion(" << name << ") not found!"; + throw std::domain_error(stream.str()); + } return **sliceUnionIt; }