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