Move unhandled exception announcement check to correct method

This commit is contained in:
Kelvin 2023-10-16 22:05:47 +02:00
parent 374d9950be
commit 081ae1dd88

View file

@ -291,8 +291,7 @@ open class JSClient : IPlatformClient {
.value;
}
catch(ex: Throwable) {
if(ex !is PluginEngineException)
announcePluginUnhandledException("isChannelUrl", ex);
announcePluginUnhandledException("isChannelUrl", ex);
return false;
}
}
@ -564,6 +563,8 @@ open class JSClient : IPlatformClient {
}
private fun announcePluginUnhandledException(method: String, ex: Throwable) {
if(ex is PluginEngineException)
return;
try {
StateAnnouncement.instance.registerAnnouncement("PluginUnhandled_${config.id}_${method}",
"Plugin ${config.name} encountered an error in [${method}]",