You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In versions 1.4.6 and previous giving invalid expressions would throw ArgumentException or ArgumentNullException, which we could handle accordingly. Instead now a NullReferenceException is thrown, which is bad practice to throw and bad practice to catch.
2. Exception
Exception message: System.NullReferenceException: Object reference not set to an instance of an object.
Stack trace:
at System.Linq.Dynamic.Core.Parser.ExpressionHelper.GenerateStaticMethodCall(String methodName, Expression left, Expression right)
at System.Linq.Dynamic.Core.Parser.ExpressionHelper.GenerateGreaterThanEqual(Expression left, Expression right)
at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseComparisonOperator()
at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseLogicalAndOrOperator()
at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseIn()
at System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseOrOperator()
at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda(Type delegateType, ParsingConfig parsingConfig, Boolean createParameterCtor, ParameterExpression[] parameters, Type resultType, String expression, Object[] values)
at System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda[T,TResult](ParsingConfig parsingConfig, Boolean createParameterCtor, String expression, Object[] values)
This example uses a numeric operator on a string type, which is invalid and should throw an ArgumentException, but instead throws a NullReferenceException.
Change the nuget version to 1.4.6 to see the expected exception
4. Any further technical details
Valid expressions do not show any regressions.
The text was updated successfully, but these errors were encountered:
1. Description
In versions 1.4.6 and previous giving invalid expressions would throw
ArgumentException
orArgumentNullException
, which we could handle accordingly. Instead now aNullReferenceException
is thrown, which is bad practice to throw and bad practice to catch.2. Exception
3. Fiddle or Project
https://dotnetfiddle.net/sjyNPf
This example uses a numeric operator on a string type, which is invalid and should throw an
ArgumentException
, but instead throws aNullReferenceException
.Change the nuget version to 1.4.6 to see the expected exception
4. Any further technical details
Valid expressions do not show any regressions.
The text was updated successfully, but these errors were encountered: