Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error message formatting; see #777 #780

Merged
merged 1 commit into from
Aug 17, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Backends/Tabular/BicubicBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ void CoolProp::BicubicBackend::update(CoolProp::input_pairs input_pair, double v
// Call again, but this time with molar units; S: [J/kg/K] * [kg/mol] -> [J/mol/K]
update(PSmolar_INPUTS, val1, val2*AS->molar_mass()); return;
}
case PT_INPUTS:{
case PT_INPUTS:{
_p = val1; _T = val2;
if (!single_phase_logpT.native_inputs_are_in_range(_T, _p)){
// Use the AbstractState instance
using_single_phase_table = false;
if (get_debug_level() > 5){ std::cout << "inputs are not in range"; }
throw ValueError(format("inputs are not in range, p=%Lg, T=%Lg", _p, _T));
throw ValueError(format("inputs are not in range, p=%g Pa, T=%g K", _p, _T));
}
else{
using_single_phase_table = true; // Use the table !
Expand Down Expand Up @@ -547,4 +547,4 @@ void CoolProp::BicubicBackend::invert_single_phase_y(const SinglePhaseGriddedTab
}
}

#endif // !defined(NO_TABULAR_BACKENDS)
#endif // !defined(NO_TABULAR_BACKENDS)