try {
$this->cache = CacheDriverFactory::create('memcache');
} catch (\Exception $exception) {
- print "Memcache - TestCase failed: " . $exception->getMessage();
- throw new \Exception();
+ throw new \Exception("Memcache - TestCase failed: " . $exception->getMessage(), $exception->getCode(), $exception);
}
return $this->cache;
} else {
try {
$this->cache = CacheDriverFactory::create('memcached');
} catch (\Exception $exception) {
- print "Memcached - TestCase failed: " . $exception->getMessage();
- throw new \Exception();
+ throw new \Exception("Memcached - TestCase failed: " . $exception->getMessage(), $exception->getCode(), $exception);
}
return $this->cache;
} else {
try {
$this->cache = CacheDriverFactory::create('redis');
} catch (\Exception $exception) {
- print "Redis - TestCase failed: " . $exception->getMessage();
- throw new \Exception();
+ throw new \Exception("Redis - TestCase failed: " . $exception->getMessage(), $exception->getCode(), $exception);
}
return $this->cache;
} else {