/** * Executes an asynchronous command. * * @param CommandInterface $command Command to execute. * * @return AwsDynamoDbResponse */ protected function executeAsyncCommand(CommandInterface $command) { try { $result = $this->client->executeAsync($command); } catch (AwsException $e) { /* Return an error response. */ return new AwsDynamoDbResponse(null, $e); } return new AwsDynamoDbResponse($result, null); }