Package org.apache.solr.common

Examples of org.apache.solr.common.SolrException.code()


      assertEquals("sort exception root cause",
                   SolrException.class, root.getClass());
      SolrException e = (SolrException) root;
      assertEquals("incorrect error type",
                   SolrException.ErrorCode.BAD_REQUEST,
                   SolrException.ErrorCode.getErrorCode(e.code()));
      assertTrue("exception doesn't contain field name",
                 -1 != e.getMessage().indexOf("sortabuse_t"));
    }
  }
View Full Code Here


        if (solrException.getCause() != null
            && ClassUtils.getShortName(solrException.getCause().getClass()).equalsIgnoreCase("ParseException")) {
          return new InvalidDataAccessApiUsageException((solrException.getCause()).getMessage(),
              solrException.getCause());
        } else {
          ErrorCode errorCode = SolrException.ErrorCode.getErrorCode(solrException.code());
          switch (errorCode) {
            case NOT_FOUND:
            case SERVICE_UNAVAILABLE:
            case SERVER_ERROR:
              return new DataAccessResourceFailureException(solrException.getMessage(), solrException);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.