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

Zola serve doesn't give detailed error information #1398

Closed
lf- opened this issue Mar 9, 2021 · 3 comments
Closed

Zola serve doesn't give detailed error information #1398

lf- opened this issue Mar 9, 2021 · 3 comments
Labels
bug done in pr Already done in a PR

Comments

@lf-
Copy link
Contributor

lf- commented Mar 9, 2021

Bug Report

Environment

Zola version: next 51644a7

Expected Behavior

I'd like to get full error details such as when I call zola serve and it builds initially, or when I call zola build:

dev/zlog - [main●] » ~/dev/zola/target/debug/zola serve
Building site...
Error: Error parsing templates
Reason: 
* Failed to parse "/home/jade/dev/zlog/templates/shortcodes/image.html"
 --> 4:25
  |
4 |     <a href="{{ get_url("images/{{ name }}") }}"␊
  |                         ^---
  |
  = expected an identifier (must start with a-z)

Current Behavior

I got this error without details of where exactly it failed.

Change detected @ 2021-03-09 01:45:51
-> Template changed /home/jade/dev/zlog/templates/shortcodes/image.html
Error parsing templates
Done in 18ms.

Step to reproduce

Break something in a template while zola serve is running, then save. The error message will not include the reason.

@Keats Keats added the bug label Mar 9, 2021
@Keats
Copy link
Collaborator

Keats commented Mar 9, 2021

Looks like the reloaded site need to call the unravel_errors function as well.

@alice-i-cecile
Copy link
Contributor

For others who encounter this thread: calling zola build from scratch will give you much better error messages, which is an extremely helpful workaround.

@Keats
Copy link
Collaborator

Keats commented Aug 12, 2021

It's fixed in the commit above, will be released this weekend if I don't forget about it

@Keats Keats added the done in pr Already done in a PR label Aug 12, 2021
@Keats Keats closed this as completed in 6a39253 Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug done in pr Already done in a PR
Projects
None yet
Development

No branches or pull requests

3 participants