Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

fix error handling example #53

Merged
merged 1 commit into from
Jun 28, 2017
Merged

fix error handling example #53

merged 1 commit into from
Jun 28, 2017

Conversation

smola
Copy link
Member

@smola smola commented Jun 28, 2017

No description provided.

@bzz
Copy link
Contributor

bzz commented Jun 28, 2017

Looks good to me.

@@ -144,6 +145,11 @@ func main() {
if err != nil {
os.Exit(1)
}

if resp.Status != protocol.Ok {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this example is for illustrative purposes, it may be interesting to add an error message per error to better explain what the problem is. In this case something like
Source code has not been parsed correctly, or similar.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated it to include an error message, also making it explicit that resp.Errors might contain multiple errors.

@smola smola merged commit 77930d4 into bblfsh:master Jun 28, 2017
@smola smola deleted the fix-error-handling-example branch June 28, 2017 13:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants