templating icon indicating copy to clipboard operation
templating copied to clipboard

More context in template engine crashes

Open adrianm64 opened this issue 4 months ago • 0 comments

Is your feature request related to a problem? Please describe.

I'm maintaining a couple of templates and sometimes the template engine crashes and stops on some file.

The detailed log just says

... [2025-09-09 09:55:41.597] [Debug] [Microsoft.TemplateEngine.Edge.Template.TemplateCreator] => [Execute] => [Template content generation]: Template content generation finished, took 90 ms Failed to create template. Details: Error while processing file /src/MyTemplate/doc.md Object reference not set to an instance of an object.

Often I can work out what the problem is, e.g. unbalanced #if, but not always.

Describe the solution you'd like.

Would it be possible to include more context in the error message? At least a stack trace which gives some kind of hint of what the problem is.

Not interested in a solution for the specific case with the markdown file above (I just removed it from the template), but for future problems.

Additional context

No response

adrianm64 avatar Sep 10 '25 06:09 adrianm64