class ResourceException extends Exception (View source)

internal  This is an internal part of the oEmbed system and should only be used by oEmbed-related code in Drupal core.
 

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

Properties

protected string $url

The URL of the resource.

protected array $data

The resource data.

Methods

__construct(string $message, string $url, array $data = [], Exception $previous = NULL)

ResourceException constructor.

string
getUrl()

Gets the URL of the resource which caused the exception.

array
getData()

Gets the raw resource data, if available.

Details

__construct(string $message, string $url, array $data = [], Exception $previous = NULL)

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.

string getUrl()

Gets the URL of the resource which caused the exception.

Return Value

string

The URL of the resource.

array getData()

Gets the raw resource data, if available.

Return Value

array

The resource data.