Skip to content

Commit

Permalink
revert exception type back to socket timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
amanjeetsingh150 committed Dec 31, 2024
1 parent 1426e1e commit 4639606
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions maestro-client/src/main/java/maestro/drivers/IOSDriver.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
}
}
Expand Down Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 4639606

Please sign in to comment.