src/CommunicationException.php
public static function handle(CommunicationException $exception)
    {
        if ($exception->shouldResetConnection()) {
            $connection = $exception->getConnection();

            if ($connection->isConnected()) {
                $connection->disconnect();
            }
        }

        throw $exception;
    }
public static function handle(CommunicationException $exception)
    {
        if ($exception->shouldResetConnection()) {
            $connection = $exception->getConnection();

            if ($connection->isConnected()) {
                $connection->disconnect();
            }
        }

        throw $exception;
    }
public static function handle ( CommunicationException $ exception ) { if ( $ exception -> shouldResetConnection ( ) ) { $ connection = $ exception -> getConnection ( ) ; if ( $ connection -> isConnected ( ) ) { $ connection -> disconnect ( ) ; } } throw $ exception ; }
Helper method to handle exceptions generated by a connection object.

@param CommunicationException $exception Exception.

@throws CommunicationException
Helper method to handle exceptions generated by a connection object .