diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php index c203169bfc1efc73c0e8ccbba4e3ac50cef972ae..50ba704fa1a66ef8678868ebd62b9e3ef0ddb70a 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php @@ -32,6 +32,7 @@ namespace VuFindSearch\Backend\Solr; use InvalidArgumentException; +use VuFindSearch\Backend\Exception\BackendException; use VuFindSearch\Backend\Exception\HttpErrorException; use VuFindSearch\Backend\Exception\RequestErrorException; @@ -410,9 +411,9 @@ class Connector implements \Zend\Log\LoggerAwareInterface } } - // If we got this far, everything failed -- throw the most recent - // exception caught above. - throw $exception; + // If we got this far, everything failed -- throw a BackendException with + // the most recent exception caught above set as the previous exception. + throw new BackendException('Problem connecting to Solr.', null, $exception); } /**