Collection<PsiClassType> (@NotNull PsiTryStatement statement) { Collection<PsiClassType> types = new ArrayList<>(); PsiCodeBlock tryBlock = statement.getTryBlock(); if (tryBlock != null) { types.addAll(ExceptionUtil.getThrownExceptions(tryBlock)); } PsiResourceList resourceList = statement.getResourceList(); if (resourceList != null) { types.addAll(ExceptionUtil.getThrownExceptions(resourceList)); } return types; }