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

fix: ignore curl exceptions when closing webdriver inside destructor #565

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mtorromeo
Copy link

Curl exceptions when quitting WebDriver are being thrown for different reasons, but are hard to handle since the method is called from inside the destructor.

The destructor is called when we are done with WebDriver anyway, and if there is an error quitting (most likely because WebDriver is not responding) we can safely ignore it IMO.

The try/catch is placed on purpose on the destructor only and not in the quit method so that when calling quit manually the exception can still be handled by the caller.

@Chris53897
Copy link

@mtorromeo Thank you for working on this.

Looks like this works under windows, but not on mac (according to unittests).

I am using https://github.com/zenstruck/browser (on Mac) and with your changes i get this message.
I guess the same error as in the failing unittests for mac.

Call to a member function append() on null
Process finished with exit code 2

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