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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0
    • 4.1, 6.0
    • clients - java
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: