Improve slice union not found error message
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user