void (@NotNull PsiParameter parameter, @NotNull Set<? extends PsiClassType> thrownTypes, @NotNull Consumer<? super HighlightInfo.Builder> errorSink) { PsiElement declarationScope = parameter.getDeclarationScope(); if (!(declarationScope instanceof PsiCatchSection)) return; PsiType caughtType = parameter.getType(); if (caughtType instanceof PsiClassType) { HighlightInfo.Builder info = checkSimpleCatchParameter(parameter, thrownTypes, (PsiClassType)caughtType); if (info != null) { errorSink.accept(info); } return; } if (caughtType instanceof PsiDisjunctionType) { checkMultiCatchParameter(parameter, thrownTypes, errorSink); } }