Skip to content
Snippets Groups Projects
Commit d8e6b3e6 authored by Demian Katz's avatar Demian Katz
Browse files

Improved exception handling.

- Solr connection failure should trigger a BackendException so the record loader can work around it when in "tolerate backend exceptions" mode.
parent afb3f302
No related merge requests found
...@@ -32,6 +32,7 @@ namespace VuFindSearch\Backend\Solr; ...@@ -32,6 +32,7 @@ namespace VuFindSearch\Backend\Solr;
use InvalidArgumentException; use InvalidArgumentException;
use VuFindSearch\Backend\Exception\BackendException;
use VuFindSearch\Backend\Exception\HttpErrorException; use VuFindSearch\Backend\Exception\HttpErrorException;
use VuFindSearch\Backend\Exception\RequestErrorException; use VuFindSearch\Backend\Exception\RequestErrorException;
...@@ -410,9 +411,9 @@ class Connector implements \Zend\Log\LoggerAwareInterface ...@@ -410,9 +411,9 @@ class Connector implements \Zend\Log\LoggerAwareInterface
} }
} }
// If we got this far, everything failed -- throw the most recent // If we got this far, everything failed -- throw a BackendException with
// exception caught above. // the most recent exception caught above set as the previous exception.
throw $exception; throw new BackendException('Problem connecting to Solr.', null, $exception);
} }
/** /**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment