Skip to content

Report error location as "Line n, column n." - #682

Merged
stencil-harness[bot] merged 2 commits into
masterfrom
robot/issue-314
Nov 11, 2026
Merged

stencil-harness[bot] merged 2 commits into
masterfrom
robot/issue-314

Conversation

@stencil-harness

Copy link
Copy Markdown
Contributor

Refs #314

Follow-up to #681, as requested on #314: located Handlebars exceptions now report their position as Line n, column n. instead of Occured at: n:n.

Before:

Unexpected '!File' inside an expression: ...

Occured at: 0:9

<p>{{#if !File}}yes{{/if}}</p>
         ^

After:

Unexpected '!File' inside an expression: ...

Line 0, column 9.

<p>{{#if !File}}yes{{/if}}</p>
         ^

Details

  • Only the text changes. The numbers are the same as before: zero-based, and equal to HandlebarsException.Line / Column.
  • Messages without a location are unchanged.
  • Compatibility: code that searches messages for Occured at: will no longer find it. The Line and Column properties added in Expose error location on exceptions and show the source line with a caret #681 are the reliable way to read the position.

Tests

The ExceptionTests assertions are updated to the new format. The full suite passes (2234 tests).

🤖 Generated with Claude Code

Closes #314

stencil-harness Bot and others added 2 commits November 10, 2026 20:17
Replaces the "Occured at: line:column" suffix of located Handlebars
exception messages with "Line n, column n.". The numbers are unchanged
(zero-based, same as HandlebarsException.Line/Column).

Refs #314

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@stencil-harness
stencil-harness Bot merged commit f6e613b into master Nov 11, 2026
7 checks passed
@stencil-harness
stencil-harness Bot deleted the robot/issue-314 branch November 11, 2026 01:59
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.

Please report betters errors (context) when having mistakes in the template

0 participants