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

Attempt to give better error reporting in the UI. #30

Merged
merged 5 commits into from Jul 8, 2022

Conversation

a2aaron
Copy link
Owner

@a2aaron a2aaron commented Jul 8, 2022

Currently, this just tries to parse "missing variable" messages from Tera.
This is very hacky and brittle, and would be better done if Tera could
report rendering errors more richly. Some other things that aren't great
are:

We highlight the entire column, when we should try to pinpoint the
specific row that caused the error.
Im not really sure what to do if the script uses a key that isn't in the
config table. This is annoying to detect but could feasibly be done.

Must be merged with #27

Would complete one task in #9

Requires using the library branch `better-errors`.

Currently, this just tries to parse "missing varible" messages from Tera.
This is very hacky and brittle, and would be better done if Tera could
report rendering errors more richly. Some other things that aren't great
are:

- We highlight the entire column, when we should try to pinpoint the
  specific row that caused the error.
- Im not really sure what to do if the script uses a key that isn't in the
  config table. This is annoying to detect but could feasibly be done.
We now `await init()` at the very end of `index.js` to avoid blocking
the rest of the file from running. This allows the page to be more
useable at start up and lets things like the Config Table generate
before Cohoard has loaded.
It's eggbug!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@a2aaron a2aaron marked this pull request as ready for review July 8, 2022 06:14
@a2aaron a2aaron merged commit 8fa7cf9 into gh-pages Jul 8, 2022
@a2aaron a2aaron deleted the better-errors-gh-pages branch July 8, 2022 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant