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

Don't let cache failure break translator.

parent 67af726f
No related merge requests found
...@@ -394,9 +394,19 @@ $config = array( ...@@ -394,9 +394,19 @@ $config = array(
); );
// Set up language caching for better performance: // Set up language caching for better performance:
$translator->setCache( try {
$sm->get('VuFind\CacheManager')->getCache('language') $translator->setCache(
); $sm->get('VuFind\CacheManager')->getCache('language')
);
} catch (\Exception $e) {
// Don't let a cache failure kill the whole application, but make
// note of it:
$logger = $sm->get('VuFind\Logger');
$logger->debug(
'Problem loading cache: ' . get_class($e) . ' exception: '
. $e->getMessage()
);
}
return $translator; return $translator;
}, },
......
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