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

Extra debug output for template execution errors #596

Open
joberly opened this issue May 6, 2024 · 2 comments
Open

Extra debug output for template execution errors #596

joberly opened this issue May 6, 2024 · 2 comments

Comments

@joberly
Copy link

joberly commented May 6, 2024

Describe the Feature

Provide extra template error context or debug data when internally generated templates fail to parse or execute.

Expected Behavior

When a template error occurs, return extra debug data for the template error to use as an aid to find the problematic stack or component code.

Use Case

Atmos-generated template parsing or execution failures at least sometimes result in very vague error messages like this:

template: all-atmos-sections:472: function "account" not defined

It would be beneficial if there was some extra context for this internally generated template for debug as the line number in the error message only corresponds to an internally generated template.

Describe Ideal Solution

Something like the following is probably ideal but perhaps a bit complicated:

template: all-atmos-sections:472: function "account" not defined
  in template "all-atmos-sections":
  472:         description: value for {{ account }}

Alternatives Considered

An option to dump the entire template to stderr or some kind of debug log/file would work, too.

Additional Context

No response

@GabisCampana
Copy link

@osterman
Copy link
Member

@joberly please include the current behavior your experiencing. Also makes it easier to search for issues.

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

No branches or pull requests

3 participants