Refactor - Update Chocolatey PowerShell functions to throw descriptive/appropriate exceptions
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
## Description
Update the Chocolatey provided PowerShell functions to throw descriptive and appropriate exceptions.
## Why Is It Needed
Currently they are just throwing a generic `RuntimeException`. Although they may have a specific error with them, it would be helpful for them to throw specific exceptions.
## Related Issues and Tickets
* [GitLab discussion](https://gitlab.com/chocolatey/collaborators/choco-licensed/-/merge_requests/128#note_683072975)
* [GitLab Issue to track this in Chocolatey.Extension](https://gitlab.com/chocolatey/collaborators/choco-licensed/-/issues/572)
## Acceptance Tests
* For each exception currently thrown: determine an appropriate exception
* Update exception to throw the determined exception
## Done Checklist
* [ ] Documentation has been updated.
* [ ] Automated tests have been added to cover this bug.
* [ ] Manual tests have been added to cover this bug.
Contributor guide
Research direction
Start by locating the Chocolatey-provided PowerShell functions that currently throw generic RuntimeException instances and review the related Chocolatey.Extension discussion. Inventory each existing exception and its tests, then verify that every case throws an appropriate descriptive exception with automated coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100