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

Templating exporter should have clear error reporting #3382

Closed
allanaaa opened this issue Dec 3, 2020 · 5 comments · Fixed by #3945
Closed

Templating exporter should have clear error reporting #3382

allanaaa opened this issue Dec 3, 2020 · 5 comments · Fixed by #3945
Assignees
Labels
error handling Improving the ways errors are reported to users export: template About the custom templating exporter Module: Frontend These issues involve working on HTML, CSS, and JavaScript code that affects the user interface. Type: Feature Request Identifies requests for new features or enhancements. These involve proposing new improvements.
Milestone

Comments

@allanaaa
Copy link
Contributor

allanaaa commented Dec 3, 2020

Currently when your code in the Templating exporter has a problem, the Preview window will just show "Updating..." forever.
It would be good to have a timeout after a few seconds and report back the line/character causing the problem. If not that, then just a generic error message would be an improvement.

When your code (inside double curly braces) isn't resolving correctly (e.g. because of an extra closing curly brace) the entire expression including the curly braces just outputs as a string instead.
This should have its own error message, instead of the string output.

templating

@allanaaa allanaaa added Type: Feature Request Identifies requests for new features or enhancements. These involve proposing new improvements. Status: Pending Review Indicates that the issue or pull request is awaiting review by project maintainers or collaborators labels Dec 3, 2020
@wetneb
Copy link
Member

wetneb commented Dec 3, 2020

At the moment the error is reported in the server logs.

@wetneb wetneb added export: template About the custom templating exporter Module: Frontend These issues involve working on HTML, CSS, and JavaScript code that affects the user interface. and removed Status: Pending Review Indicates that the issue or pull request is awaiting review by project maintainers or collaborators labels Dec 3, 2020
@sjathin
Copy link
Contributor

sjathin commented May 23, 2021

Hey, I would like to work on this, I tried to reproduce this, I don't see the error reported in the server logs (always) for instance when I add an extra closing curly brace there was no error on the server logs. Please correct me if I am wrong, I think this is an issue with the parser, as it does not throw an exception when the string pattern is incorrect.

@wetneb wetneb added the error handling Improving the ways errors are reported to users label May 23, 2021
@wetneb
Copy link
Member

wetneb commented May 23, 2021

Ah, then perhaps I was wrong in my comment above. Your observation seems to indicate that the template is parsed incorrectly, without throwing an error?

@sjathin
Copy link
Contributor

sjathin commented May 23, 2021

Yes, that's correct, in the screenshot below - the highlighted region shows that I have added a few extra curly braces, but there is no exception thrown.

Screenshot 2021-05-23 at 16 06 26

@wetneb
Copy link
Member

wetneb commented May 23, 2021

Ok, thanks for the investigation! Feel free to assign yourself this issue if you want to work on it :)

@sjathin sjathin self-assigned this May 23, 2021
sjathin added a commit to sjathin/OpenRefine that referenced this issue May 28, 2021
sjathin added a commit to sjathin/OpenRefine that referenced this issue May 29, 2021
sjathin added a commit to sjathin/OpenRefine that referenced this issue Jun 6, 2021
sjathin added a commit to sjathin/OpenRefine that referenced this issue Jun 6, 2021
wetneb added a commit to sjathin/OpenRefine that referenced this issue Nov 25, 2021
wetneb added a commit to sjathin/OpenRefine that referenced this issue Nov 25, 2021
… of ssh://github.com/sjathin/OpenRefine into issue-OpenRefine#3382-template-exporter-error-handling
@wetneb wetneb added this to the 3.6 milestone Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error handling Improving the ways errors are reported to users export: template About the custom templating exporter Module: Frontend These issues involve working on HTML, CSS, and JavaScript code that affects the user interface. Type: Feature Request Identifies requests for new features or enhancements. These involve proposing new improvements.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants