Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added better error handling for the gRPC server. #592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
masci merged 1 commit into arduino:master from kittaakos:daemon-exit-code
Feb 21, 2020

Conversation

Copy link
Contributor

@kittaakos kittaakos commented Feb 21, 2020

  • Consumers of the CLI have a better exit code when it fails at startup
  • Logged message to stdout, so gRPC clients know, it is time to connect

Signed-off-by: Akos Kitta kittaakos@typefox.io

// Invalid port, such as "Foo"
var dnsError *net.DNSError
if errors.As(err, &dnsError) {
logrus.Errorf("Failed to listen on TCP port: %s. %s is unknown name.", port, dnsError.Name)
Copy link
Contributor

Choose a reason for hiding this comment

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

can we do feedback.Errorf instead? This way the error will be always visible in the shell, not regarding of passing -v and will be added to the logs as well. Same for other occurrences of logrus.*

Copy link
Contributor Author

@kittaakos kittaakos Feb 21, 2020

Choose a reason for hiding this comment

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

Thank you for the feedback. I have made the changes based on your request and left the original logrus.Fatalf("failed to serve: %v", err) as is.

masci reacted with thumbs up emoji
@masci masci added this to the 0.9.0 milestone Feb 21, 2020
 - Consumers of the CLI have a better exit code when it fails at startup
 - Logged message to stdout, so gRPC clients know, it is time to connect
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
@masci masci merged commit 1eefe49 into arduino:master Feb 21, 2020
@kittaakos kittaakos deleted the daemon-exit-code branch February 21, 2020 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
1 more reviewer

@masci masci masci approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.9.0
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /