Find catch (e: Exception) and catch (e: Throwable) clauses
ProprietaryCatching 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$KtRecipemod 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.