public function ProviderException::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/modules/media/src/OEmbed/ProviderException.php \Drupal\media\OEmbed\ProviderException::__construct()
- 9 core/modules/media/src/OEmbed/ProviderException.php \Drupal\media\OEmbed\ProviderException::__construct()
ProviderException constructor.
Parameters
string $message: The exception message. '@name' will be replaced with the provider name if available, or '<unknown>' if not.
\Drupal\media\OEmbed\Provider $provider: (optional) The provider information.
\Exception $previous: (optional) The previous exception, if any.
File
- core/
modules/ media/ src/ OEmbed/ ProviderException.php, line 34
Class
- ProviderException
- Exception thrown if an oEmbed provider causes an error.
Namespace
Drupal\media\OEmbedCode
public function __construct($message, Provider $provider = NULL, \Exception $previous = NULL) {
$this->provider = $provider;
$message = str_replace('@name', $provider ? $provider
->getName() : '<unknown>', $message);
parent::__construct($message, 0, $previous);
}