From d7bc73b1e3c3ac28bd24089754d810d9dba249e4 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 4 Jan 2015 19:54:58 -0500 Subject: [PATCH] Improve error used when a cache configuation fails to start. Refs #5570 --- lib/Cake/Cache/Cache.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Cache/Cache.php b/lib/Cake/Cache/Cache.php index c8436f72a..612cbed25 100644 --- a/lib/Cake/Cache/Cache.php +++ b/lib/Cake/Cache/Cache.php @@ -178,7 +178,12 @@ class Cache { } self::$_engines[$name] = new $cacheClass(); if (!self::$_engines[$name]->init($config)) { - throw new CacheException(__d('cake_dev', 'Cache engine %s is not properly configured.', $name)); + $msg = __d( + 'cake_dev', + 'Cache engine "%s" is not properly configured. Ensure required extensions are installed, and credentials/permissions are correct', + $name + ); + throw new CacheException($msg); } if (self::$_engines[$name]->settings['probability'] && time() % self::$_engines[$name]->settings['probability'] === 0) { self::$_engines[$name]->gc();