Skip to content

Commit

Permalink
Wrap exception if not an instance of RedisException
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed May 3, 2023
1 parent 6e01617 commit edd1edc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ private function connect(): Promise

$this->connect = null;

if (!$connectException instanceof RedisException) {
$connectException = new RedisException(
'Connecting to redis server failed: ' . $connectException->getMessage(),
0,
$connectException
);
}

throw $connectException;
}

Expand Down

0 comments on commit edd1edc

Please sign in to comment.