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

RuntimeException thrown by SolrZkClient should wrap cause, have a message, or be SolrException

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1, 6.0
    • Component/s: clients - java
    • Labels:
      None

      Description

      In a few spots, but notably in the constructor for SolrZkClient, a try-catch block will catch Throwable and throw a new RuntimeException with no cause or message. Either the RuntimeException should wrap the Throwable that was caught, some sort of message should be added, or the type of the exception should be changed to SolrException so calling code can catch these exceptions without casting too broad of a net.

      Reproduce this by creating a CloudSolrServer that points to a URL that is valid, but has no server running:

      CloudSolrServer server = new CloudSolrServer("localhost:9983");

      server.connect();

        Attachments

          Activity

            People

            • Assignee:
              yseeley@gmail.com Yonik Seeley
              Reporter:
              cbartolo Colin Bartolome
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: