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
The docs indicate that the prefix refers to the rule in which the error occurred, but I have not found this to be the case. It appears to only be the position in the parsed data. Allowing the programmer to access the enclosing failing rule would help in shimming in more useful error messages without having to resort to hacks like some of the solutions to #72, since you could just make a quick map of rule names to error messages and, with a little inspection, figure out a way to give your users something more useful.
As a side note, it would also be helpful to be able to identify no match errors without the string inspection that's now necessary since the message is hard-coded This could help provide a way to squash the error message as a fallback and only use the position to highlight where the parsing stopped, indicating something (hopfully) intuitive like an improperly-formatted statement when used in conjunction with more robust errors elsewhere.
The text was updated successfully, but these errors were encountered:
The docs indicate that the prefix refers to the rule in which the error occurred, but I have not found this to be the case. It appears to only be the position in the parsed data. Allowing the programmer to access the enclosing failing rule would help in shimming in more useful error messages without having to resort to hacks like some of the solutions to #72, since you could just make a quick map of rule names to error messages and, with a little inspection, figure out a way to give your users something more useful.
As a side note, it would also be helpful to be able to identify no match errors without the string inspection that's now necessary since the message is hard-coded This could help provide a way to squash the error message as a fallback and only use the position to highlight where the parsing stopped, indicating something (hopfully) intuitive like an improperly-formatted statement when used in conjunction with more robust errors elsewhere.
The text was updated successfully, but these errors were encountered: