You are here

public function TagSearchException::__construct in Bynder 8.3

Same name and namespace in other branches
  1. 8 src/Exception/TagSearchException.php \Drupal\bynder\Exception\TagSearchException::__construct()
  2. 8.2 src/Exception/TagSearchException.php \Drupal\bynder\Exception\TagSearchException::__construct()
  3. 4.0.x src/Exception/TagSearchException.php \Drupal\bynder\Exception\TagSearchException::__construct()

Constructs TagSearchException.

Overrides BynderException::__construct

File

src/Exception/TagSearchException.php, line 15

Class

TagSearchException
Exception indicating there was an error fetching tags from the Tag Search Service.

Namespace

Drupal\bynder\Exception

Code

public function __construct($original_message) {
  $log_message = 'Unable to retrieve tags: @message';
  $log_message_args = [
    '@message' => $original_message,
  ];
  $admin_message = $this
    ->t($log_message, $log_message_args);
  $message = $this
    ->t('Searching for tags failed. Please see the logs for more information.');
  parent::__construct($message, $admin_message, $log_message, $log_message_args);
}