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

Wrapp all errors #913

Merged
merged 6 commits into from
Mar 9, 2024
Merged

Wrapp all errors #913

merged 6 commits into from
Mar 9, 2024

Conversation

guggero
Copy link
Collaborator

@guggero guggero commented Mar 7, 2024

In this PR we wrap all errors so we can properly use errors.Is() to find the cause for any error. This is especially useful for database related problems, so the underlying database error can be unwrapped.

waddrmgr/error.go Show resolved Hide resolved
wtxmgr/tx.go Outdated Show resolved Hide resolved
@guggero
Copy link
Collaborator Author

guggero commented Mar 8, 2024

Did some more regex foo and found a few more instances. Now there should really be none left (that aren't in test code).

Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM 🧩

@Roasbeef Roasbeef merged commit 70ca923 into btcsuite:master Mar 9, 2024
3 checks passed
@guggero guggero deleted the wrap-errors branch March 11, 2024 06:31
buck54321 pushed a commit to buck54321/btcwallet that referenced this pull request Apr 21, 2024
buck54321 pushed a commit to buck54321/btcwallet that referenced this pull request Apr 21, 2024
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.

2 participants