List<PsiClassType> (@NotNull PsiThrowStatement throwStatement, @Nullable PsiElement topElement) { List<PsiClassType> unhandled = new SmartList<>(); for (PsiType type : getPreciseThrowTypes(throwStatement.getException())) { List<PsiType> types = type instanceof PsiDisjunctionType ? ((PsiDisjunctionType)type).getDisjunctions() : Collections.singletonList(type); for (PsiType subType : types) { PsiClassType classType = null; if (subType instanceof PsiClassType) { classType = (PsiClassType)subType; } else if (subType instanceof PsiCapturedWildcardType) { PsiType upperBound = ((PsiCapturedWildcardType)subType).getUpperBound(); if (upperBound instanceof PsiClassType) { classType = (PsiClassType)upperBound; } } if (classType != null && !isUncheckedException(classType) && getHandlePlace(throwStatement, classType, topElement) == HandlePlace.UNHANDLED) { unhandled.add(classType); } } } return unhandled; }