Updated macros in CoolProp.cpp for deeper debugging of PropsSI function

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-08-07 17:12:32 +02:00
parent a3bf8790a8
commit 41b97875b8

View File

@@ -411,7 +411,7 @@ double PropsSI(const char *Output, const char *Name1, double Prop1, const char *
double PropsSI(const std::string &Output, const std::string &Name1, double Prop1, const std::string &Name2, double Prop2, const std::string &Ref)
{
std::string backend, fluid;
#if !defined(PROPSI_NO_ERROR_CATCH)
#if !defined(PROPSSI_NO_ERROR_CATCH)
// In this function the error catching happens;
try{
#else
@@ -421,10 +421,18 @@ double PropsSI(const std::string &Output, const std::string &Name1, double Prop1
// Here is the real code
extract_backend(Ref, backend, fluid);
return _PropsSI(Output, Name1, Prop1, Name2, Prop2, backend, fluid, std::vector<double>());
#if !defined(PROPSI_NO_ERROR_CATCH)
#if !defined(PROPSSI_NO_ERROR_CATCH)
}
catch(const std::exception& e){ set_error_string(e.what()); return _HUGE; }
catch(...){ return _HUGE; }
catch(const std::exception& e){
set_error_string(e.what());
#if defined (PROPSSI_ERROR_STDOUT)
std::cout << e.what() << std::endl;
#endif
return _HUGE;
}
catch(...){
return _HUGE;
}
#endif
}
std::vector<double> PropsSI(const std::string &Output, const std::string &Name1, const std::vector<double> &Prop1, const std::string &Name2, const std::vector<double> Prop2, const std::string &Ref, const std::vector<double> &z)