Skip to content

I can't catch exception #2

Closed
Closed
@zstergios

Description

@zstergios

Can you help?

( ! ) Fatal error: Uncaught InitPHP\Socket\Exception\SocketConnectionException: Socket Connection Error : 10060 vendor\initphp\socket\src\Client\TCP.php on line 55

        use \InitPHP\Socket\Socket;
        use \InitPHP\Socket\Exception\SocketConnectionException;
        use \InitPHP\Socket\Exception\SocketInvalidArgumentException;

	try
	{
		//error_reporting(0);
		@ini_set("default_socket_timeout",15);
		$this->client = Socket::client(Socket::TCP,$this->params['connectip'],$this->params['port']);
	}
	catch(Exception | Throwable | \SocketInvalidArgumentException | \SocketConnectionException $e)
	{
		$this->error=$e->getMessage();
		$this->setLog('connect error',$this->error);
		return false;
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions