Skip to content

Commit 679f2c9

Browse files
committed
Drop unused throw() helper from TemplateParseError
`TemplateParseError` exposed a `throw(): never` method that was never called anywhere in the codebase, and the sibling base class `TemplateExpansionError` did not expose the same helper. The asymmetry is dead surface area — `throw error` is idiomatic — so remove the helper rather than mirror it onto the expansion side. Reported by CodeRabbit in #758 (2026-05-11). Assisted-by: Claude Opus 4.7 (1M context)
1 parent cc67dd8 commit 679f2c9

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

packages/uri-template/src/template/errors.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ export class TemplateParseError extends Error {
5555
super(`${message} (at position ${position}): ${hint}`);
5656
this.name = "TemplateParseError";
5757
}
58-
throw(): never {
59-
throw this;
60-
}
6158
}
6259

6360
/**

0 commit comments

Comments
 (0)