From c2421b33ab785ada9ffb10e4dd90c7375d1063c1 Mon Sep 17 00:00:00 2001 From: MM20 <15646950+MM2-0@users.noreply.github.com> Date: Fri, 22 Dec 2023 18:30:38 +0100 Subject: [PATCH] Improve weather plugin error handling --- .../mm20/launcher2/weather/plugin/PluginWeatherProvider.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/weather/src/main/java/de/mm20/launcher2/weather/plugin/PluginWeatherProvider.kt b/data/weather/src/main/java/de/mm20/launcher2/weather/plugin/PluginWeatherProvider.kt index ef4cadda..e60d05cb 100644 --- a/data/weather/src/main/java/de/mm20/launcher2/weather/plugin/PluginWeatherProvider.kt +++ b/data/weather/src/main/java/de/mm20/launcher2/weather/plugin/PluginWeatherProvider.kt @@ -83,13 +83,13 @@ internal class PluginWeatherProvider( } catch (e: Exception) { Log.e("MM20", "Plugin $pluginAuthority threw exception") CrashReporter.logException(e) - it.resume(emptyList()) + it.resume(null) return@suspendCancellableCoroutine } if (cursor == null) { - Log.e("MM20", "Plugin $pluginAuthority returned null cursor") - it.resume(emptyList()) + Log.e("MM20", "(getWeatherData) Plugin $pluginAuthority returned null cursor") + it.resume(null) return@suspendCancellableCoroutine }