List<PsiClassType> (PsiClassType[] exceptions, final GroovyPsiElement context, final PsiClassType[] handledExceptions) { return ContainerUtil.findAll(exceptions, o -> { if (!InheritanceUtil.isInheritor(o, CommonClassNames.JAVA_LANG_EXCEPTION)) return false; for (PsiClassType type : handledExceptions) { if (TypesUtil.isAssignableByMethodCallConversion(type, o, context)) return false; } return true; }); }