Skip to content

Commit 2cfe921

Browse files
committed
- updates exception handling (redis)
1 parent bf51c8f commit 2cfe921

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Client/CacheClientFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
namespace Koded\Caching\Client;
1414

15+
use Error;
1516
use Exception;
1617
use Koded\Caching\{Cache, CacheException};
1718
use Koded\Caching\Configuration\{MemcachedConfiguration, PredisConfiguration, RedisConfiguration};
@@ -136,7 +137,7 @@ private function newRedis(RedisConfiguration $conf): \Redis
136137
catch (\RedisException $e) {
137138
error_log('[Redis] ' . $e->getMessage());
138139
throw CacheException::withConnectionErrorFor('Redis');
139-
} catch (Exception $e) {
140+
} catch (Exception | Error $e) {
140141
throw CacheException::from($e);
141142
}
142143
}

0 commit comments

Comments
 (0)