-
Notifications
You must be signed in to change notification settings - Fork 167
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
Print gonzales-pe context when parsing fails #1054
Comments
I think that Gonzales-PE does not have API for error, does it? |
Hi @varya Some time ago, there was a PR (tonyganch/gonzales-pe#222) asking about this, where the author mentioned that the When this is answered and solved in
So they can see at least the lines around the parsing error. Note: added the steps here, so it serves a documentation for users that are having this same problem and have troubles finding the place where a parsing error occurs. |
Hello, the The error is passed down to |
I'm having the same issue using LESS, unable to track down the root cause because of the poor error message. Compiling my LESS with |
Output meaningful error message to the console; fixes #1054
Hello,
Currently when the gonzales-pe parse fails, due to a syntax error, or so, the context of the error is not printed, but only the error message and the line. Example:
This would be enough perhaps when working on a single CSS file, but when working with preprocessors, like less or sass, becomes quite unclear, as we need to know also ideally the file where the error is located. But as gonzales-pe does not provide information about the file, we could print the context where the error was found.
An issue about this was raised in gonzales-pe: tonyganch/gonzales-pe#222
However, they have deactivated the setting to print the error, and left it to the users of the library, to decide wether to print the error or not.
I've been digging a bit into it, but could not find documentation or a way to print the error in sc5, perhaps any of you guys have a clearer idea?
If not, then we would need to wait until the dev of gonzales-pe, answers my question in the issue, to prepare the PR.
The text was updated successfully, but these errors were encountered: