June 2017
Intermediate to advanced
536 pages
9h 49m
English
The phpredis driver extension throws RedisException for every error that occurs using the Redis class. This makes it easy to handle errors via simple try...catch blocks:
<?phptry { $client = new Redis(); $client->connect('localhost', 6379); // Code...} catch (RedisException $e) { echo $e->getMessage(), PHP_EOL;}