mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Throws an exception on fail in connect.
This commit is contained in:
parent
b46b861383
commit
fb5495fad5
1 changed files with 2 additions and 0 deletions
|
@ -100,6 +100,7 @@ class CakeSocket {
|
|||
* Connect the socket to the given host and port.
|
||||
*
|
||||
* @return boolean Success
|
||||
* @throws Exception
|
||||
*/
|
||||
public function connect() {
|
||||
if ($this->connection != null) {
|
||||
|
@ -119,6 +120,7 @@ class CakeSocket {
|
|||
|
||||
if (!empty($errNum) || !empty($errStr)) {
|
||||
$this->setLastError($errStr, $errNum);
|
||||
throw new Exception($errStr, $errNum);
|
||||
}
|
||||
|
||||
$this->connected = is_resource($this->connection);
|
||||
|
|
Loading…
Reference in a new issue