Set<PsiClassType> (@NotNull PsiTryStatement statement) { Set<PsiClassType> thrownTypes = new HashSet<>(); PsiCodeBlock tryBlock = statement.getTryBlock(); if (tryBlock != null) { thrownTypes.addAll(ExceptionUtil.collectUnhandledExceptions(tryBlock, tryBlock)); } PsiResourceList resources = statement.getResourceList(); if (resources != null) { thrownTypes.addAll(ExceptionUtil.collectUnhandledExceptions(resources, resources)); } return thrownTypes; }