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

errors: update documentation #598

Merged
merged 2 commits into from
May 8, 2019
Merged

errors: update documentation #598

merged 2 commits into from
May 8, 2019

Conversation

husio
Copy link
Contributor

@husio husio commented May 8, 2019

  • make successABCICode public variable
  • update documentation

resolve #494

- make `successABCICode` public variable
- update documentation

resolve #494
@husio husio requested review from ruseinov and ethanfrey May 8, 2019 12:18
Copy link
Contributor

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Minor changes requested. Looks good.

errors/doc.go Outdated
Error declarations should be generic and cover broad range of cases. Each
returned error instance can wrap a generic error declaration to provide more
details.
Unless an error is very specific for an extension (ie ErrInvalidSequence in
Copy link
Contributor

Choose a reason for hiding this comment

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

s/Unless/If/

(as it reads, it seems opposite to what you intended)

Copy link
Contributor

Choose a reason for hiding this comment

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

And maybe a line before suggesting to use the generic errors registered in this module if possible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 5496a17

}

The first time an error instance is wrapped a stacktrace is attached as well.
Stacktrace information can be printed using %+v and %v formats.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think nice to include this info (unless no longer valid). Possibly formatted differently

%+v is the full stack trace
%v appends a compressed [filename:line] where the error was created

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 5496a17

@husio husio force-pushed the error_improvements_issue_494 branch from 51edc25 to 5496a17 Compare May 8, 2019 12:42
@husio husio merged commit c7e914b into master May 8, 2019
@husio husio deleted the error_improvements_issue_494 branch May 8, 2019 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

errors package improvements
2 participants