Fix compilation with GMX_USE_MUPARSER=None
authorRoland Schulz <roland@rschulz.eu>
Wed, 22 Sep 2021 07:13:16 +0000 (00:13 -0700)
committerRoland Schulz <roland.schulz@intel.com>
Wed, 22 Sep 2021 17:45:10 +0000 (17:45 +0000)
Without muparser enabled, it is in invalid to catch its exception.

Related #4165

src/gromacs/pulling/transformationcoordinate.cpp

index cc52053af58b78fd2f3109ccd57694f70e9cb2d8..5271e397d08074b0a6f14f9bf2b292da9eee140a 100644 (file)
@@ -62,6 +62,7 @@ double getTransformationPullCoordinateValue(pull_coord_work_t* coord)
     {
         result = coord->expressionParser.evaluate(coord->transformationVariables);
     }
+#if HAVE_MUPARSER
     catch (mu::Parser::exception_type& e)
     {
         GMX_THROW(InternalError(
@@ -69,6 +70,7 @@ double getTransformationPullCoordinateValue(pull_coord_work_t* coord)
                              transformationPullCoordinateIndex + 1,
                              e.GetMsg().c_str())));
     }
+#endif
     catch (std::exception& e)
     {
         GMX_THROW(InternalError(