Skip to content

Commit

Permalink
added wrapping connection exception in a cb exception
Browse files Browse the repository at this point in the history
  • Loading branch information
AubreyHewes committed Feb 16, 2017
1 parent b5b9e82 commit ba740a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Communibase/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\ConnectException;
use Psr\Http\Message\StreamInterface;

/**
Expand Down Expand Up @@ -774,6 +775,10 @@ private function call($method, array $arguments)
(($_ =& $response['errors']) ?: [])
);

} catch (ConnectException $e) {

throw new Exception('Can not connect', 500, $e, []);

}
}
}

0 comments on commit ba740a3

Please sign in to comment.