@Override
    public void visitMethodReferenceExpression(@NotNull PsiMethodReferenceExpression expression) {
      super.visitMethodReferenceExpression(expression);
      if (!expression.isConstructor()) {
        return;
      }
      final PsiType type = PsiMethodReferenceUtil.getQualifierType(expression);
      if (!InheritanceUtil.isInheritor(type, CommonClassNames.JAVA_LANG_EXCEPTION)) {
        return;
      }
      final PsiElement target = expression.resolve();
      if (!(target instanceof PsiMethod method)) {
        return;
      }
      if (method.getParameterList().getParametersCount() != 0) {
        return;
      }
      final PsiClass aClass = method.getContainingClass();
      if (aClass == null || !hasAccessibleConstructorWithParameters(aClass, expression)) {
        return;
      }
      final PsiElement qualifier = expression.getQualifier();
      if (qualifier == null) {
        return;
      }
      registerError(qualifier, aClass.getQualifiedName());
    }
@Override
    public void visitMethodReferenceExpression(@NotNull PsiMethodReferenceExpression expression)