static @NotNull List<PsiClassType> getUnhandledExceptions(final @NotNull PsiCall methodCall,
                                                            final @Nullable PsiElement topElement,
                                                            @NotNull Predicate<? super PsiCall> skipCondition) {
    //exceptions only influence the invocation type after overload resolution is complete
    if (MethodCandidateInfo.isOverloadCheck()) {
      return Collections.emptyList();
    }
    final JavaResolveResult result = PsiDiamondType.getDiamondsAwareResolveResult(methodCall);
    final PsiElement element = result.getElement();
    final PsiMethod method = element instanceof PsiMethod ? (PsiMethod)element : null;
    if (method == null) {
      return Collections.emptyList();
    }
    if (skipCondition.test(methodCall)) {
      return Collections.emptyList();
    }

    final PsiClassType[] thrownExceptions = method.getThrowsList().getReferencedTypes();
    if (thrownExceptions.length == 0) {
      return Collections.emptyList();
    }
    List<Pair<PsiMethod, PsiSubstitutor>> otherTargets;
    if (methodCall instanceof PsiTemplateExpression) {
      otherTargets = getTemplateTargets((PsiTemplateExpression)methodCall, method);
    }
    else if (!isArrayClone(method, methodCall) && methodCall instanceof PsiMethodCallExpression) {
      otherTargets = getMethodCallTargets((PsiMethodCallExpression)methodCall, method);
    }
    else {
      otherTargets = Collections.emptyList();
    }
    GlobalSearchScope scope = methodCall.getResolveScope();
    List<PsiClassType> ex = collectSubstituted(result.getSubstitutor(), thrownExceptions, scope);
    for (Pair<PsiMethod, PsiSubstitutor> pair : otherTargets) {
      final PsiClassType[] exceptions = pair.first.getThrowsList().getReferencedTypes();
      if (exceptions.length == 0) {
        return Collections.emptyList();
      }
      retainExceptions(ex, collectSubstituted(pair.second, exceptions, scope));
    }
    return getUnhandledExceptions(methodCall, topElement, PsiSubstitutor.EMPTY, ex.toArray(PsiClassType.EMPTY_ARRAY));
  }
static @NotNull List<PsiClassType> getUnhandledExceptions(final @NotNull PsiCall methodCall,
                                                            final @Nullable PsiElement topElement,
                                                            @NotNull Predicate<? super PsiCall> skipCondition)