Improve weather plugin error handling

This commit is contained in:
MM20 2023-12-22 18:30:38 +01:00
parent 7db400fb10
commit c2421b33ab
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -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
}