function ResourceException::__construct

Same name in other branches
  1. 8.9.x core/modules/media/src/OEmbed/ResourceException.php \Drupal\media\OEmbed\ResourceException::__construct()
  2. 10 core/modules/media/src/OEmbed/ResourceException.php \Drupal\media\OEmbed\ResourceException::__construct()
  3. 11.x core/modules/media/src/OEmbed/ResourceException.php \Drupal\media\OEmbed\ResourceException::__construct()

ResourceException constructor.

Parameters

string $message: The exception message.

string $url: The URL of the resource. Can be the actual endpoint URL or the canonical URL.

array $data: (optional) The raw resource data, if available.

\Exception $previous: (optional) The previous exception, if any.

File

core/modules/media/src/OEmbed/ResourceException.php, line 41

Class

ResourceException
Exception thrown if an oEmbed resource cannot be fetched or parsed.

Namespace

Drupal\media\OEmbed

Code

public function __construct($message, $url, array $data = [], \Exception $previous = NULL) {
    $this->url = $url;
    $this->data = $data;
    parent::__construct($message, 0, $previous);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.