boolean (PsiMethod method, PsiClassType exception) { PsiClassType[] throwsTypes = method.getThrowsList().getReferencedTypes(); for (PsiClassType throwsType : throwsTypes) { if (throwsType.isAssignableFrom(exception)) { return true; } } return false; }