Change exceptions for transformation expression evaluation from
"internal bug" to "user input inconsistency", as these with throw
with incorrect or inconsistent user input.
Added explicit check for quotes, as that might confuse users.
"'transformation'",
coord_index_for_output)));
}
+ else if (pcrd->expression[0] == '"' || pcrd->expression[0] == '\'')
+ {
+ GMX_THROW(gmx::InvalidInputError(gmx::formatString(
+ "pull-coord%d-expression should not start with double quote or a quote",
+ coord_index_for_output)));
+ }
if (pcrd->dx == 0)
{
GMX_THROW(gmx::InvalidInputError(gmx::formatString(
#if HAVE_MUPARSER
catch (mu::Parser::exception_type& e)
{
- GMX_THROW(InternalError(
+ GMX_THROW(InconsistentInputError(
formatString("failed to evaluate expression for transformation pull-coord%d: %s\n",
transformationPullCoordinateIndex + 1,
e.GetMsg().c_str())));
#endif
catch (std::exception& e)
{
- GMX_THROW(InternalError(
+ GMX_THROW(InconsistentInputError(
formatString("failed to evaluate expression for transformation pull-coord%d.\n"
"Last variable pull-coord-index: %d.\n"
"Message: %s\n",