From 79635608581afdf51214ce1d4d24be72082e8557 Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Mon, 24 Nov 2014 00:27:34 -0500 Subject: [PATCH] Throw an error if input sizes are not the same for PropsSI Signed-off-by: Ian Bell --- src/CoolProp.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/CoolProp.cpp b/src/CoolProp.cpp index e95c464d..2afad5aa 100644 --- a/src/CoolProp.cpp +++ b/src/CoolProp.cpp @@ -516,8 +516,7 @@ std::vector PropsSI(const std::string &Output, const std::string &Name1, std::vector 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) {