Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ProviderException.php

function 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\OEmbed

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal