void (@NotNull GrCatchClause clause) { final GrParameter parameter = clause.getParameter(); if (parameter == null) return; final GrTypeElement typeElement = parameter.getTypeElementGroovy(); if (typeElement != null) { final PsiType type = typeElement.getType(); if (type instanceof PsiClassType && ((PsiClassType)type).resolve() == null) return; //don't highlight unresolved types final PsiClassType throwable = TypesUtil.createType(CommonClassNames.JAVA_LANG_THROWABLE, clause); if (!throwable.isAssignableFrom(type)) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("catch.statement.parameter.type.should.be.a.subclass.of.throwable")).range(typeElement).create(); } } }