add try/catch around functionparser to give more info

It is frustrating if you have a parser error inside FunctionParser
because it won't tell you which expression is wrong or which parameter
in the prm is wrong. This is now fixed.