From 463960681d467c1d742bc447fc24f2199fefb71f Mon Sep 17 00:00:00 2001 From: Amanjeet Singh Date: Tue, 31 Dec 2024 13:12:53 +0530 Subject: [PATCH] revert exception type back to socket timeout --- maestro-client/src/main/java/maestro/drivers/IOSDriver.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/maestro-client/src/main/java/maestro/drivers/IOSDriver.kt b/maestro-client/src/main/java/maestro/drivers/IOSDriver.kt index cb4a71bde5..672a2c9cdf 100644 --- a/maestro-client/src/main/java/maestro/drivers/IOSDriver.kt +++ b/maestro-client/src/main/java/maestro/drivers/IOSDriver.kt @@ -415,7 +415,6 @@ class IOSDriver( override fun inputText(text: String) { metrics.measured("operation", mapOf("command" to "inputText")) { - // silently fail if no XCUIElement has focus runDeviceCall("inputText") { iosDevice.input(text = text) } } } @@ -528,8 +527,10 @@ class IOSDriver( return try { call() } catch (socketTimeoutException: SocketTimeoutException) { - throw MaestroException.DriverTimeout("iOS driver timed out while doing $callName call") + LOGGER.error("Got socket timeout processing $callName command", socketTimeoutException) + throw socketTimeoutException } catch (appCrashException: IOSDeviceErrors.AppCrash) { + LOGGER.error("Detected app crash during $callName command", appCrashException) throw MaestroException.AppCrash(appCrashException.errorMessage) } }