boolean (@NotNull PsiClassType newException, @NotNull PsiType catchType) { if (catchType instanceof PsiDisjunctionType disjunction) { for (PsiType type : disjunction.getDisjunctions()) { if (newException.isAssignableFrom(type)) { return true; } } return false; } return newException.isAssignableFrom(catchType); }