Skip to content

Refactor exception handling while destructing the client. #676

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Basster
Copy link

@Basster Basster commented Jun 6, 2025

While testing I stumbled over #466 again with errors like:

Failed to connect to 127.0.0.1 port 9515 after 0 ms: Couldn't connect to server in /builds/[...]/app/vendor/php-webdriver/webdriver/lib/Exception/Internal/WebDriverCurlException.php on line 20

I mentioned that the WebDriverCurlException doesn't inherit from WebDriverException and therefore wasn't caught.

While digging in the code, I'v found that php-webdriver/webdriver introduced a common exception interface in 1.14.0 (from 2023-02-09), so I though its safe/mature enough to bump the dependency version.

I also found out that if destructing of the Client fails, the BrowserManager will not quit, so I moved the exception handling for the webdriver exceptions into the actual quit method.

Basster added 3 commits June 6, 2025 15:21
Bump php-webdriver/webdriver to 1.14.0, because they introduced a common interface to identify all exceptions thrown in php-webdriver.
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.

1 participant