lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsmiley <...@git.apache.org>
Subject [GitHub] lucene-solr pull request #169: Add status return for replication SOLR-10249
Date Wed, 22 Mar 2017 19:51:27 GMT
Github user dsmiley commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/169#discussion_r107513516
  
    --- Diff: solr/core/src/java/org/apache/solr/handler/IndexFetcher.java ---
    @@ -321,9 +369,16 @@ boolean fetchLatestIndex(boolean forceReplication, boolean forceCoreReload)
thro
           try {
             response = getLatestVersion();
           } catch (Exception e) {
    -        LOG.error("Master at: " + masterUrl + " is not available. Index fetch failed.
Exception: " + e.getMessage());
    -        return false;
    -      }
    +        final String errorMsg = e.getMessage();
    --- End diff --
    
    Granted e.getMessage() was what this code was doing before you made changes but can you
please use e.toString() instead?  IMO, e.getMessage() should rarely if ever be called instead
of e.toString() because e.toString() critically contains the name of the exception itself.
 The "message" alone can be unclear without the exception class.  Consider `FileNotFoundException`
and there are others.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message