diff --git a/app/src/main/java/net/pipe01/pinepartner/scripting/api/adapters/WatchAdapter.kt b/app/src/main/java/net/pipe01/pinepartner/scripting/api/adapters/WatchAdapter.kt index 13dc5e8..ff1617d 100644 --- a/app/src/main/java/net/pipe01/pinepartner/scripting/api/adapters/WatchAdapter.kt +++ b/app/src/main/java/net/pipe01/pinepartner/scripting/api/adapters/WatchAdapter.kt @@ -44,10 +44,7 @@ class WatchAdapter : ApiScriptableObject(WatchAdapter::class) { field.isAccessible = true field.get(time) as Double } - else -> { - Context.throwAsScriptRuntimeEx(IllegalArgumentException("Invalid time")) - 0.0 - } + else -> throw Context.throwAsScriptRuntimeEx(IllegalArgumentException("Invalid time")) } val localTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(timeMillis.toLong()), ZoneId.systemDefault())