protected function setErrorCallback(ConnectionInterface $connection, callable $callback)
    {
        $connection->setErrorCallback(function ($connection, $exception) use ($callback) {
            \call_user_func($callback, $this, $exception, $connection);
        });
    }