diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.cpp index 5a2827293..9f03dba16 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include @@ -485,8 +486,10 @@ UDQSet udq_cast(const UDQSet& lhs, const UDQSet& rhs) { if (lhs.size() != rhs.size()) { if (lhs.var_type() != UDQVarType::SCALAR) { - printf("s1: %ld s2: %ld \n", lhs.size(), rhs.size()); - throw std::logic_error("Type/size mismatch"); + auto msg = fmt::format("Type/size mismatch when combining UDQs {}(size={}, type={}) and {}(size={}, type={})", + lhs.name(), lhs.size(), lhs.var_type(), + rhs.name(), rhs.size(), rhs.var_type()); + throw std::logic_error(msg); } if (rhs.var_type() == UDQVarType::WELL_VAR)