Skip to content
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

Improve error handling #581

Merged
merged 8 commits into from
Oct 9, 2019
Merged

Improve error handling #581

merged 8 commits into from
Oct 9, 2019

Conversation

Gilthoniel
Copy link
Contributor

@Gilthoniel Gilthoniel commented Oct 8, 2019

This PR changes the errors to make use of the xerrors package. The %v policy is respected except in case where the error is reused later for comparison.

It also update the logger so that the file path replaces the function name to have precise location of the log and we can make use of the auto-resolution of the IDEs.

Note that log.Error will print the complete stack trace if available. The formatting is left to the user for the other functions.

@Gilthoniel Gilthoniel self-assigned this Oct 8, 2019
@Gilthoniel Gilthoniel added this to WIP in Cothority via automation Oct 8, 2019
@Gilthoniel
Copy link
Contributor Author

Waiting for #582

Copy link
Member

@ineiti ineiti left a comment

Choose a reason for hiding this comment

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

wow - huge work...

log/lvl_test.go Outdated Show resolved Hide resolved
network/local.go Outdated Show resolved Hide resolved
network/local.go Show resolved Hide resolved
network/router.go Show resolved Hide resolved
network/tcp_test.go Outdated Show resolved Hide resolved
server.go Outdated Show resolved Hide resolved
simul/platform/localhost.go Outdated Show resolved Hide resolved
Copy link
Member

@ineiti ineiti left a comment

Choose a reason for hiding this comment

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

Now that I look at it in more details...

log/lvl.go Show resolved Hide resolved
log/loggers.go Show resolved Hide resolved
@Gilthoniel
Copy link
Contributor Author

Comments should be fixed.

Also part of dedis/cothority#2061

@ineiti
Copy link
Member

ineiti commented Oct 9, 2019

Good for me to go.

@Gilthoniel Gilthoniel moved this from WIP to Ready4Merge in Cothority Oct 9, 2019
@jeffallen jeffallen merged commit 3561427 into master Oct 9, 2019
Cothority automation moved this from Ready4Merge to Closed Oct 9, 2019
@ineiti ineiti deleted the improve_error_handling branch October 9, 2019 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Cothority
  
Closed
Development

Successfully merging this pull request may close these issues.

None yet

3 participants