Skip to content

Commit b1911f6

Browse files
committed
maintain previous credis exception when throwing redis exceptions from resque
1 parent af57021 commit b1911f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Resque/Redis.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function __construct($server, $database = null)
142142
}
143143
}
144144
catch(CredisException $e) {
145-
throw new Resque_RedisException($e);
145+
throw new Resque_RedisException('Error communicating with Redis: ' . $e->getMessage(), 0, $e);
146146
}
147147
}
148148

@@ -245,7 +245,7 @@ public function __call($name, $args)
245245
return $this->driver->__call($name, $args);
246246
}
247247
catch (CredisException $e) {
248-
throw new Resque_RedisException($e);
248+
throw new Resque_RedisException('Error communicating with Redis: ' . $e->getMessage(), 0, $e);
249249
}
250250
}
251251

0 commit comments

Comments
 (0)