microsoft / microsoft/go-sqlcmd

Add support for individualized error handling to the checkErr pattern

Open
#212 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement housekeeping
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.