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

patch TemplateError to remove cause.name in message #90

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

noelforte
Copy link
Contributor

Hi—sorry, quick patch here on the error subclass.

I'd like to revert part of #89 by removing the lines that add (via ErrorName) to the error message. I got the idea to include that from Eleventy, but since Eleventy already includes that as a feature, you get error messages that duplicate the (via ...) text, like so:

[11ty] Error in template src/vento.vto:1:61
[11ty] 
[11ty] <empty file>
[11ty] 
[11ty] (via TemplateError) (via TemplateError)
[11ty] Error in template src/_includes/include.vto:1:1
[11ty] 
[11ty] {{ hello.hello }}
[11ty] 
[11ty] (via TypeError) (via TemplateError)

Is it better to leave the error handling (including cause chains, and the like) up to the implementation, like Eleventy, Lume, and others?

Sorry for the confusion!

@oscarotero oscarotero merged commit 0fe8b04 into ventojs:main Dec 23, 2024
1 check passed
@oscarotero
Copy link
Collaborator

fair.
Thanks

@noelforte noelforte deleted the error-subclass-patch branch December 24, 2024 06:02
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.

2 participants