Open Thomasdezeeuw opened 2 months ago
I don't remember why it's done that way tbh
Would you accept a pr to include the source information in the Display
implementation?
I'm not sure, would that be considered a breaking change?
I'm not sure, would that be considered a breaking change?
It's hard to say. I think the worse case is if people already worked around this issue and printed the source error themselves, leading to the source error being printed twice. Which, while not ideal, isn't the end of the world either?
I think i'd consider a breaking change but mostly for the end user. If it's included in Display, we will see the source errors twice for apps that did a workaround as you say. I'd prefer keeping that change for the next breaking version
We've been hitting some template errors, usually nothing major, but the error message were never very useful. Usually they are just
Failed to render '$FILE'"
, that's it. I just realised thatError
actually contains more information, for exampleVariable `$VAR` not found in context while rendering '$FILE'
. However we've missed those complete because we print out error using{}
, i.e. the standard way of printing error.Could
Error::source
also be included in theDisplay
implementation ofError
? This would make debug a whole lot easier for us.