Gaufrette\Adapter\AzureBlobStorage::failIfContainerNotFound PHP Method

failIfContainerNotFound() protected method

Throws a runtime exception if a give ServiceException derived from a "container not found" error.
protected failIfContainerNotFound ( MicrosoftAzure\Storage\Common\ServiceException $exception, string $action )
$exception MicrosoftAzure\Storage\Common\ServiceException
$action string
    protected function failIfContainerNotFound(ServiceException $exception, $action)
    {
        $errorCode = $this->getErrorCodeFromServiceException($exception);
        if ($errorCode == self::ERROR_CONTAINER_NOT_FOUND) {
            throw new \RuntimeException(sprintf('Failed to %s: container "%s" not found.', $action, $this->containerName), $exception->getCode());
        }
    }