From b1911f6867209f148511965518bbea333073e078 Mon Sep 17 00:00:00 2001 From: Chris Boulton Date: Tue, 3 Feb 2015 09:54:03 -0800 Subject: [PATCH] maintain previous credis exception when throwing redis exceptions from resque --- lib/Resque/Redis.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Resque/Redis.php b/lib/Resque/Redis.php index 2c0a11e..1176232 100644 --- a/lib/Resque/Redis.php +++ b/lib/Resque/Redis.php @@ -142,7 +142,7 @@ class Resque_Redis } } catch(CredisException $e) { - throw new Resque_RedisException($e); + throw new Resque_RedisException('Error communicating with Redis: ' . $e->getMessage(), 0, $e); } } @@ -245,7 +245,7 @@ class Resque_Redis return $this->driver->__call($name, $args); } catch (CredisException $e) { - throw new Resque_RedisException($e); + throw new Resque_RedisException('Error communicating with Redis: ' . $e->getMessage(), 0, $e); } }