matheval / expression-evaluator-c-sharp

Matheval is a mathematical expressions evaluator library written in C#. Allows to evaluate mathematical, boolean, string and datetime expressions
https://matheval.org/
MIT License
107 stars 29 forks source link

misleading errormessage #22

Open MaximD3veloper opened 7 months ago

MaximD3veloper commented 7 months ago

When a collection variable is given to a operation without expecting one, something like "1+2 + List", an exception is thrown:

System.Exception: PLUS operator can only be applied to numeric, string, date at org.matheval.Operators.Binop.PlusOperator.Calculate(Object left, Object right, ExpressionContext dc) at org.matheval.Expression.VisitNode(Node root) at org.matheval.Expression.Eval[T]()

The message is a little misleading, because the items in this list are either numeric, string or date. Is it possible for you to change the error message to something more understandable?