boolean (@NotNull PsiClassType exceptionType, PsiClassType @NotNull [] referencedTypes, PsiSubstitutor substitutor) { for (PsiClassType classType : referencedTypes) { PsiType psiType = substitutor.substitute(classType); if (psiType != null && psiType.isAssignableFrom(exceptionType)) return true; } return false; }