From fb10d74f7b080c899043b0dac78743a3d782b4dd Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Mon, 20 Jul 2015 20:15:10 -0600 Subject: [PATCH] Don't crash if binary mixture cannot be loaded; closes #710 --- src/Backends/Helmholtz/MixtureParameters.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Backends/Helmholtz/MixtureParameters.cpp b/src/Backends/Helmholtz/MixtureParameters.cpp index 7fb0e798..3ee51a69 100644 --- a/src/Backends/Helmholtz/MixtureParameters.cpp +++ b/src/Backends/Helmholtz/MixtureParameters.cpp @@ -66,7 +66,7 @@ public: /** \brief Construct the binary pair library including all the binary pairs that are possible * - * The data structure also includes space for a string that gives the pointer to the departure function to be used for this binary pair. * + * The data structure also includes space for a string that gives the pointer to the departure function to be used for this binary pair. */ MixtureBinaryPairLibrary() { @@ -127,7 +127,10 @@ public: dict.add_number("betaT", betaT); } } - else{ throw ValueError(); } + else{ + std::cout << "Loading error: binary pair of " << name1 << " & " << name2 << "does not provide either a) xi and zeta b) gammaT, gammaV, betaT, and betaV" << std::endl; + continue; + } if (binary_pair_map.find(CAS) == binary_pair_map.end()){ // Add to binary pair map by creating one-element vector