From cc58a4e93a70937eb0a71b5f06042bd37244d2b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sautter?= Date: Sun, 8 Dec 2024 18:58:50 +0100 Subject: [PATCH] [java] include the exit code to the error message of a failed driver startup --- .../src/org/openqa/selenium/remote/service/DriverService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/src/org/openqa/selenium/remote/service/DriverService.java b/java/src/org/openqa/selenium/remote/service/DriverService.java index 0e0c04f693d9c..87d7e7cb75d61 100644 --- a/java/src/org/openqa/selenium/remote/service/DriverService.java +++ b/java/src/org/openqa/selenium/remote/service/DriverService.java @@ -242,8 +242,10 @@ public void start() throws IOException { processFinished.cancel(true); break; case PROCESS_DIED: + int exitValue = process.exitValue(); process = null; - throw new WebDriverException("Driver server process died prematurely."); + throw new WebDriverException( + "Driver server process died prematurely, exit value: " + exitValue); case PROCESS_IS_ACTIVE: process.shutdown(); throw new WebDriverException("Timed out waiting for driver server to bind the port.");