Throw an error if input sizes are not the same for PropsSI

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-11-24 00:27:34 -05:00
parent 92531ec373
commit 7963560858

View File

@@ -516,8 +516,7 @@ std::vector<double> PropsSI(const std::string &Output, const std::string &Name1,
std::vector<double> out(Prop1.size(), _HUGE);
if (Prop1.size() != Prop2.size())
{
std::cout << format("Sizes of Prop1 [%d] and Prop2 [%d] to PropsSI are not the same", Prop1.size(), Prop2.size()) << std::endl;
return out;
throw ValueError(format("Sizes of Prop1 [%d] and Prop2 [%d] to PropsSI are not the same", Prop1.size(), Prop2.size()));
}
for (std::size_t i = 0; i < Prop1.size(); ++i)
{