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

Feature: addd explicit helper name + viewname to errors, causes… #475

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

jankapunkt
Copy link
Collaborator

As a follow up on the closed PR #368 I am providing a small fix to improve error context when thrown within helpers.

There are three states the error message can obtain:

  • Lokal 'Exception in ${template.viewName} ${helperName}'
  • Global 'Exception in global helper ${name}'
  • Fallback 'Exception in template helper:'

Copy link
Collaborator

@zodern zodern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very good.

It's probably out of scope for this PR, but I'm wondering if it would also be useful for some people to attach the details to the error object (error.helper, error.template, error.origionalMessge, etc.).

@jankapunkt
Copy link
Collaborator Author

@zodern I personally would find this very helpful and I would go for another PR to add such feature to the existing error handler, which might even be the better solution for improved error handling without breaking existing things

@nachocodoner nachocodoner merged commit e333e09 into master Feb 4, 2025
2 checks passed
@nachocodoner nachocodoner deleted the feature/improved-errormsg-helpers branch February 4, 2025 16:11
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.

3 participants