Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4107

Parse Error message lost from 3.5.0 to 3.6.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.6.1
    • None
    • clients - java
    • None

    Description

      QueryComponent.prepare builds a SolrException from ParseException encountered, using a constructor that forces error message to null

      in 3.5.0
      public SolrException(ErrorCode code, Throwable th) {
      super(th);
      this.code=code.code;
      logged=true;
      }

      in 3.6.1 :
      public SolrException(ErrorCode code, Throwable th) {
      this(code, null, th, (th instanceof SolrException) ? ((SolrException)th).logged : false);
      }
      calling :
      public SolrException(ErrorCode code, String msg, Throwable th, boolean alreadyLogged) {
      super(msg,th);
      this.code=code.code;
      logged=alreadyLogged;
      }

      I don't think this is a desired behaviour, so I guessed this should be corrected by changing line 93 to
      this(code, th.getMessage(), th, (th instanceof SolrException) ?(SolrException)th).logged : false);

      I'll try to add a patch later today.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pigo Pierre Gossé
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: