@@ -178,11 +178,11 @@ |
||
| 178 | 178 | $this->connection = new AMQPStreamConnection($this->host, $this->port, $this->user, $this->password); |
| 179 | 179 | } catch (\ErrorException $e) { |
| 180 | 180 | /** |
| 181 | - * We are trying to catch the exception when the connection if refused |
|
| 182 | - **/ |
|
| 183 | - if (preg_match("/.*unable to connect.*Connection refused.*/", $e->__toString())) { |
|
| 184 | - throw new ConnectionException("Cannot create the connection", 404, $e); |
|
| 185 | - } |
|
| 181 | + * We are trying to catch the exception when the connection if refused |
|
| 182 | + **/ |
|
| 183 | + if (preg_match("/.*unable to connect.*Connection refused.*/", $e->__toString())) { |
|
| 184 | + throw new ConnectionException("Cannot create the connection", 404, $e); |
|
| 185 | + } |
|
| 186 | 186 | throw $e; |
| 187 | 187 | } |
| 188 | 188 | $this->channel = $this->connection->channel(); |