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()); } }