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
I found the bug, that if I assign the function result to a variable an exception thrown by that function will be assigned to that variable.
In the following example I would expect the Evaluate function to throw the exception and the result variable does not exist, but in the current version the exception is thrown and additionally assigned to the variable.
[Test]
public void Evaluate_WithException_ThrowsExceptionAndDoesNotAssignIt()
{
TestConnectExpressionEvaluator evaluator = new TestConnectExpressionEvaluator();
evaluator.Variables.Add("dummy", new DummyForException());
Assert.Throws<ExpressionEvaluatorSyntaxErrorException>(() => evaluator.Evaluate("result = dummy.bang()"));
Assert.That(evaluator.Variables.ContainsKey("result"), Is.False);
}
public class DummyForException
{
public void bang()
{
throw new Exception();
}
}
The text was updated successfully, but these errors were encountered:
Hi,
I found the bug, that if I assign the function result to a variable an exception thrown by that function will be assigned to that variable.
In the following example I would expect the Evaluate function to throw the exception and the result variable does not exist, but in the current version the exception is thrown and additionally assigned to the variable.
The text was updated successfully, but these errors were encountered: