[erlang-questions] erl_syntax[_lib] error handling
Sat Apr 19 14:53:39 CEST 2014
The defensive programming I was talking about was that revert/1 tries to not crash on weird input, sorry if that was not clear.
Le 19 avr. 2014 à 13:57, Richard Carlsson <carlsson.richard@REDACTED> a écrit :
> On 2014-04-19 13:51 , Anthony Ramine wrote:
>> I think the defensive programming in syntax_tools should be removed entirely.
> You might have misunderstood - my point was that there isn't any defensive programming in there. Hence, if you feed it invalid input, you can't be sure what the resulting exception will be, if any.
>> How revert/1 manages to sometimes return custom nodes as is but sometimes crash and sometimes return the actual reverted node drives me insane.
> That's a different issue. When I originally wrote erl_syntax, it seemed best to pass through anything that couldn't be handled, since the format was more or less undocumented in those days. That could probably be changed now.
More information about the erlang-questions