-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error message not helpfull #82
Comments
found it; the -a line is the offending line, or at least, when it is removed, the error disappears.
|
Yes, the error messages are not helpful. This is a limitation that we inherit from the docopt sources. I'd like to see this fixed, but I think it's a more global problem that just the C++ implementation. I'm always open to suggestions on this. |
Ok, so what is efficient, should I try to improve this in the python implementation of docopt and you can pull it in / convert that somehow? I guess better error messages would require more script/detailed parsing or analysis of the parser output ? |
It seems like almost all errors fall through to this point. Simply printing out all the arguments that the user passed isn't useful. That line might as well be It seems like fixing this would involve rewriting a lot of code (and breaking parity because of better error messages). I really like this library and I'm almost willing to do that myself but I don't think it would be worth the effort (plus I'm pretty lazy!). This issue has lead me to doing these sort of checks on my end (which sort of defeats the purpose of docopt a little bit). For example, I use |
I would love to see better error messages but I think it would be a lot of work -- almost a full rewrite. I would be open to it, but I think it's a big effort. This repo was mostly a port of the Python one, which (as you note) suffers from the same problem. If someone wants to start that, I would be willing to work with them to do it in a way that is going to be successful. |
message has no linenr, nor any text/tokens of line offending line.
I will add the reproduction scenario as soon as I figure out what line it is, by binary search elimination.
The text was updated successfully, but these errors were encountered: