{"record":{"id":"515a661243e54c90","repo":"emberjs/ember.js","slug":"message","errorCode":null,"errorMessage":"${message}","messagePattern":"\\$\\{message\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/@glimmer/syntax/lib/parser/tokenizer-event-handlers.ts","lineNumber":561,"sourceCode":"      Done: () => {\n        assert(false, 'This should never be called');\n      },\n    } as const satisfies {\n      [S in keyof States]: Handler;\n    };\n\n    let next: string;\n\n    do {\n      next = this.tokenizer.peek();\n      handlers[state.state](next);\n    } while (state.state !== 'Done' && next !== '');\n\n    assert(state.state === 'Done', 'bug in block params parser');\n  }\n\n  reportSyntaxError(message: string): void {\n    throw generateSyntaxError(message, this.offset().collapsed());\n  }\n\n  assembleConcatenatedValue(\n    parts: (ASTv1.MustacheStatement | ASTv1.TextNode)[]\n  ): ASTv1.ConcatStatement {\n    assertPresentArray(parts, `the concatenation parts of an element should not be empty`);\n\n    let first = getFirst(parts);\n    let last = getLast(parts);\n\n    return b.concat({\n      parts,\n      loc: this.source.spanFor(first.loc).extend(this.source.spanFor(last.loc)),\n    });\n  }\n\n  validateEndTag(\n    tag: StartTag | EndTag,","sourceCodeStart":543,"sourceCodeEnd":579,"githubUrl":"https://github.com/emberjs/ember.js/blob/26f97246a8bf2e28edf26ac3093da2e86c04ffc5/packages/@glimmer/syntax/lib/parser/tokenizer-event-handlers.ts#L543-L579","documentation":"reportSyntaxError is the generic escape hatch in the tokenizer event handlers: any handler that detects invalid template syntax calls it with a custom message, throwing a GlimmerSyntaxError located at the current (collapsed) offset.","triggerScenarios":"Any invalid Handlebars construct detected by the tokenizer event handlers that has no dedicated error path, e.g. malformed attribute/mustache structures found during parsing.","commonSituations":"Typos in templates, invalid interpolation forms, editing .hbs files by hand, build tools compiling broken templates.","solutions":["Read the custom message and the reported line/column","Fix the syntax at the reported location in the .hbs file","Validate templates in CI or in your editor with a Glimmer/Ember language plugin to catch it early"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { parse(template) } catch (e) { if (e.name === 'GlimmerSyntaxError' && e.loc) { report(e.message, e.loc.startPosition, e.loc.endPosition); } else throw e; }","preventionTips":["Compile templates as part of CI to catch syntax errors early","Use ember-template-lint","Keep a .hbs grammar/plugin enabled in your editor"],"tags":["glimmer","handlebars","template-syntax"],"backgroundTag":"handlebars-syntax-error","analyzedSha":"26f97246a8bf2e28edf26ac3093da2e86c04ffc5","analyzedAt":"2026-09-01T05:01:28.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}