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

Wrap errors with go 1.13 %w verb #743

Merged
merged 3 commits into from Apr 29, 2021

Conversation

sashayakovtseva
Copy link
Contributor

Hello,

I am using browserless and connecting to it with chromedp. When browserless is under a high load ws connections are closed (see this option) and dial returns io.EOF after the first read. To make it more convenient I suggest to wrap dial errors to enable errors.Is behavior instead of direct strings comparison here.

@ZekeLu
Copy link
Member

ZekeLu commented Apr 27, 2021

Hi @sashayakovtseva , would you like to find all the fmt.Errorf and fix them together? For example, #793 should be fixed too.

@sashayakovtseva
Copy link
Contributor Author

Hey @ZekeLu,

I've just pushed changes for wrapping errors with the %w verb. However, in #793 page load error wraps yet another string.

I'd rather leave that kind of refactoring to maintainers since that is a pretty large piece I am not willing to change now, sorry.

@ZekeLu
Copy link
Member

ZekeLu commented Apr 29, 2021

Hello, @sashayakovtseva . My bad, I thought they are the same.

Just double checked, you've handled all the %w case. Thank you!

@ZekeLu ZekeLu merged commit 254eeac into chromedp:master Apr 29, 2021
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.

None yet

2 participants