Enable detekt rule TooGenericExceptionThrown and fix existing issue.

This commit is contained in:
Benoit Marty 2023-07-26 10:38:44 +02:00
parent 297d77af85
commit bd0031445e
2 changed files with 2 additions and 2 deletions

View file

@ -23,5 +23,5 @@ import com.bumble.appyx.core.plugin.plugins
interface NodeInputs : Plugin
inline fun <reified I : NodeInputs> Node.inputs(): I {
return plugins<I>().firstOrNull() ?: throw RuntimeException("Make sure to actually pass NodeInputs plugin to your node")
return requireNotNull(plugins<I>().firstOrNull()) { "Make sure to actually pass NodeInputs plugin to your node" }
}

View file

@ -58,7 +58,7 @@ exceptions:
ThrowingExceptionsWithoutMessageOrCause:
active: true
TooGenericExceptionThrown:
active: false
active: true
InstanceOfCheckForException:
active: true