microsoft / microsoft/go-sqlcmd
Add support for individualized error handling to the checkErr pattern
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 595
- Forks
- 91
- Avg merge
- 9h 35m
- Merged PRs (30d)
- 1
Description
Right now we inject a checkErr handler, which we use for to cope with all err return where we always expect a nil response, and let the upper layer cope with it. But this doesn't allow for nuance in error handling. But in general for a CLI there is little nuance, if something generates and err, we just bail.
Comment in PR:
"Can the app layer implementations of checkErr similar to how there can be multiple levels of a try/catch for exceptions?
If there's only a global error handler referenced by checkErr then any code that needs individualized error handling isn't going to use this wrapper. "
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the injected checkErr handler is used across the CLI and how app-layer implementations could provide more specific handling. Define what individualized handling should look like alongside the global handler, then verify that errors without specialized handling still bail out as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100