string-to-real returns Java Exception
The StrategoXT <string-to-real> strategy returns a java exception when the format doesn’t match, whereas <string-to-int> simply fails when the input is not convertible. This causes the run to break rather than it looking for strategies that might succeed.
I don’t know whether this is the intended functionality?Submitted by Jeffrey Goderie on 27 October 2015 at 15:20
Thank you for reporting. I agree that the behavior of this strategy is unexpected and incorrect. Therefore i think it’s a valid issue. I will push a fix for this tonight. Expect the strategy to fail in case of a malformed string.
To make the behavior consistent i will also update
string-to-intrelated strategies to have the same behavior.
This is now fixed in Spoofax Nightly and Spoofax Core Nightly.
Log in to post comments