Find empty catch blocks

Proprietary

An empty catch (catch (e: Exception) { }) eats every exception and produces no record of it ever happening. Even a logger call records that something went wrong; an empty block makes the failure undebuggable.

org.openrewrite.kotlin.functional.FindTryCatchSwallowingException$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.functional.FindTryCatchSwallowingException$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.