Improve weather plugin error handling
This commit is contained in:
parent
7db400fb10
commit
c2421b33ab
@ -83,13 +83,13 @@ internal class PluginWeatherProvider(
|
|||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e("MM20", "Plugin $pluginAuthority threw exception")
|
Log.e("MM20", "Plugin $pluginAuthority threw exception")
|
||||||
CrashReporter.logException(e)
|
CrashReporter.logException(e)
|
||||||
it.resume(emptyList())
|
it.resume(null)
|
||||||
return@suspendCancellableCoroutine
|
return@suspendCancellableCoroutine
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cursor == null) {
|
if (cursor == null) {
|
||||||
Log.e("MM20", "Plugin $pluginAuthority returned null cursor")
|
Log.e("MM20", "(getWeatherData) Plugin $pluginAuthority returned null cursor")
|
||||||
it.resume(emptyList())
|
it.resume(null)
|
||||||
return@suspendCancellableCoroutine
|
return@suspendCancellableCoroutine
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user