ProviderException.php
Same filename and directory in other branches
Namespace
Drupal\media\OEmbedFile
-
core/
modules/ media/ src/ OEmbed/ ProviderException.php
View source
<?php
namespace Drupal\media\OEmbed;
/**
* Exception thrown if an oEmbed provider causes an error.
*
* @internal
* This is an internal part of the oEmbed system and should only be used by
* oEmbed-related code in Drupal core.
*/
class ProviderException extends \Exception {
/**
* ProviderException constructor.
*
* @param string $message
* The exception message. '@name' will be replaced with the provider name
* if available, or '<unknown>' if not.
* @param \Drupal\media\OEmbed\Provider $provider
* (optional) The provider information.
* @param \Throwable $previous
* (optional) The previous exception, if any.
*/
public function __construct($message, protected ?Provider $provider = NULL, ?\Throwable $previous = NULL) {
$message = str_replace('@name', $this->provider ? $this->provider
->getName() : '<unknown>', $message);
parent::__construct($message, 0, $previous);
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| ProviderException | Exception thrown if an oEmbed provider causes an error. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.