Skip to content
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

Syntax errors are hard to debug #108

Closed
ponychicken opened this issue Jun 18, 2016 · 4 comments
Closed

Syntax errors are hard to debug #108

ponychicken opened this issue Jun 18, 2016 · 4 comments

Comments

@ponychicken
Copy link
Contributor

Just received this:
Tale\Jade\Parser\Exception: Failed to parse Jade: The import instruction can't have children (indent at 5:2) in /Volumes/Leo/kirbysites/site/plugins/jade/vendor/talesoft/tale-jade/Parser.php on line 1199

It would be nice if errors always said which jade file caused the error and where..

@TorbenKoehn
Copy link
Member

Can you give me the stacktrace of that one?

I'll try to improve this.

@ponychicken
Copy link
Contributor Author

screenshot 2016-06-28 13 04 19

@TorbenKoehn
Copy link
Member

Okay

Well, the error itself seems to occur on an include or extends statement (Both are seen as imports by the Tale Jade engine). Make sure that those don't have any kind of child element or a sibling element that's indented too far (Mixing tabs and spaces may also create this error)

I can't tell you, which file it is, sadly, I'll improve error reporting further :)

TorbenKoehn pushed a commit that referenced this issue Aug 19, 2016
…solved correctly

Addressed #113, classes can now start with a dash

Addressed #112, block expansion now handles following classes correctly

Addressed #108 and improved error handling, including a re-write of most exception messages with more details
@TorbenKoehn
Copy link
Member

I improved error handling and re-wrote most error messages.

If you find something that doesn't show errors detailed enough, re-open this issue please :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants