Actually check the size of the directory of tables and warn or error appropriately; Closes #43

This commit is contained in:
Ian Bell
2015-03-02 21:17:11 -07:00
parent 2682799307
commit ceef2cd960
2 changed files with 15 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ namespace CoolProp
class CoolPropBaseError: public std::exception
{
public:
enum ErrCode { eNotImplemented, eSolution, eAttribute, eOutOfRange, eValue, eWrongFluid, eComposition, eInput, eNotAvailable, eHandle, eKey, eUnableToLoad};
enum ErrCode { eNotImplemented, eSolution, eAttribute, eOutOfRange, eValue, eWrongFluid, eComposition, eInput, eNotAvailable, eHandle, eKey, eUnableToLoad,eDirectorySize};
CoolPropBaseError(const std::string &err, ErrCode code) throw() : m_code(code), m_err(err) {}
~CoolPropBaseError() throw() {};
virtual const char* what() const throw() { return m_err.c_str(); }
@@ -36,6 +36,7 @@ typedef CoolPropError<CoolPropBaseError::eValue> ValueError;
typedef CoolPropError<CoolPropBaseError::eKey> KeyError;
typedef CoolPropError<CoolPropBaseError::eHandle> HandleError;
typedef CoolPropError<CoolPropBaseError::eUnableToLoad> UnableToLoadError;
typedef CoolPropError<CoolPropBaseError::eDirectorySize> DirectorySizeError;
// ValueError specializations
template <CoolPropBaseError::ErrCode errcode>