Skip to content

Commit 2a29c6b

Browse files
tablackburnclaude
andcommitted
docs(changelog): correct dot-source catch block before/after description
The Fixed entry described the change as `throw $_` → bare `throw`, but `throw $_` was an intermediate state inside PR #14's review iterations. The actual user-visible change from main was: a string `throw` (which wrapped the original error in a fresh ErrorRecord) → bare `throw` (which preserves the original ErrorRecord and stack trace). Addresses Copilot inline review comment on PR #15. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 90ecacb commit 2a29c6b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ own `CHANGELOG.md` (generated from `CHANGELOG.template.md` during init).
2828
### Fixed
2929

3030
- `tests/Help.tests.ps1`: replaced undefined `$parameterNames` with `$commandParameterNames` in the help-vs-code parameter check (was silently asserting against `$null`).
31-
- `{{ModuleName}}/{{ModuleName}}.psm1`: dot-source catch block now preserves the original `ErrorRecord` via bare `throw` (was `throw $_`, which wrapped the error).
31+
- `{{ModuleName}}/{{ModuleName}}.psm1`: dot-source catch block now preserves the original `ErrorRecord` via bare `throw`. Previously the catch threw a new string (`"Unable to dot source ..."`), which wrapped the original exception in a fresh `ErrorRecord` and lost the underlying stack trace.
3232

3333
[Unreleased]: https://github.com/tablackburn/PowerShellModuleTemplate/compare/v2026.04.29...HEAD
3434
[2026.04.29]: https://github.com/tablackburn/PowerShellModuleTemplate/releases/tag/v2026.04.29

0 commit comments

Comments
 (0)