tera icon indicating copy to clipboard operation
tera copied to clipboard

How to find the exact line and column in a Tera Error?

Open lquerel opened this issue 2 years ago • 3 comments

I am trying to pinpoint the exact location of an error during the rendering of a tera template. An example of error message I received is as follows:

Variable `id` not found in context while rendering 'example.tera'

I am looking for a method to derive the exact line and column where the error originated. Unfortunately, I haven't been able to extract this detailed information from the error structure as well.

Can anyone provide guidance or tips on how I might locate the precise location of this error in the template? Any help would be greatly appreciated.

lquerel avatar Sep 14 '23 23:09 lquerel

It's not tracked in v1 but is in v2. You would need to wait for v2 to be released to get it.

Keats avatar Sep 15 '23 19:09 Keats

Ok. Do you have an approximate idea of when version 2 will be available?

lquerel avatar Sep 15 '23 21:09 lquerel

No clue. The happy path and some error handling is mostly done (https://github.com/Keats/tera2) it's missing error handling for rendering and filters/functions/tests but I've started paternity leave yesterday so I don't know when I'll get to it

Keats avatar Sep 16 '23 19:09 Keats