Find catch (e: Exception) and catch (e: Throwable) clauses

Proprietary

Catching Exception or Throwable is almost always too broad — it sweeps up NullPointerException, IllegalStateException, and OutOfMemoryError into one branch. Narrow the catch to the specific exception types the block actually handles.

org.openrewrite.kotlin.search.FindGenericExceptionCatch$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.search.FindGenericExceptionCatch$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.