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) {
|
[&name](SliceUnion const* s) {
|
||||||
return name == s->name;
|
return name == s->name;
|
||||||
});
|
});
|
||||||
if (sliceUnionIt == unions.end())
|
if (sliceUnionIt == unions.end()) {
|
||||||
throw std::domain_error("SliceUnion not found!");
|
std::stringstream stream;
|
||||||
|
stream << "SliceUnion(" << name << ") not found!";
|
||||||
|
throw std::domain_error(stream.str());
|
||||||
|
}
|
||||||
return **sliceUnionIt;
|
return **sliceUnionIt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -552,8 +552,11 @@ namespace atrip {
|
|||||||
[&name](SliceUnion const* s) {
|
[&name](SliceUnion const* s) {
|
||||||
return name == s->name;
|
return name == s->name;
|
||||||
});
|
});
|
||||||
if (sliceUnionIt == unions.end())
|
if (sliceUnionIt == unions.end()) {
|
||||||
throw std::domain_error("SliceUnion not found!");
|
std::stringstream stream;
|
||||||
|
stream << "SliceUnion(" << name << ") not found!";
|
||||||
|
throw std::domain_error(stream.str());
|
||||||
|
}
|
||||||
return **sliceUnionIt;
|
return **sliceUnionIt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user