Move unhandled exception announcement check to correct method

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

View file

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