Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
|
||
import java.io.File; | ||
import org.openqa.selenium.Capabilities; | ||
import org.openqa.selenium.WebDriverException; | ||
import org.openqa.selenium.internal.Require; | ||
import org.openqa.selenium.manager.SeleniumManager; | ||
import org.openqa.selenium.manager.SeleniumManagerOutput.Result; | ||
|
@@ -37,8 +38,8 @@ public static Result getPath(DriverService service, Capabilities options, boolea | |
if (result.getDriverPath() == null) { | ||
try { | ||
result = SeleniumManager.getInstance().getDriverPath(options, offline); | ||
} catch (Exception e) { | ||
throw new NoSuchDriverException( | ||
} catch (RuntimeException e) { | ||
throw new WebDriverException( | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
joerg1985
Author
Member
|
||
String.format("Unable to obtain: %s, error %s", options, e.getMessage()), e); | ||
} | ||
} | ||
|
The NoSuchDriverException adds a link to the troubleshooting guide for driver issues, is there a reason you used the more generic exception? I'm refactoring other things in this class now and want to know if I'm breaking something else you did.