You are here

class UnableToAddUsageException in Bynder 8

Exception indicating that the usage can't be added for the Bynder asset.

Hierarchy

Expanded class hierarchy of UnableToAddUsageException

1 file declares its use of UnableToAddUsageException
UsageEventSubscriber.php in src/EventSubscriber/UsageEventSubscriber.php

File

src/Exception/UnableToAddUsageException.php, line 8

Namespace

Drupal\bynder\Exception
View source
class UnableToAddUsageException extends BynderException {

  /**
   * Constructs UnableToAddUsageException.
   */
  public function __construct($original_message) {
    $log_message = 'Unable to add usage for bynder asset: @message';
    $log_message_args = [
      '@message' => $original_message,
    ];
    $message = $this
      ->t('Unable to add usage for Bynder asset. Please see the logs for more information.');
    parent::__construct($message, NULL, $log_message, $log_message_args);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BynderException::$adminMessage protected property User-facing for admin users.
BynderException::$adminPermission protected property Admin permission related to this exception. 2
BynderException::$logMessage protected property Message to be logged in the Drupal's log.
BynderException::$logMessageArgs protected property Arguments for the log message.
BynderException::$messageLevel protected property Message level to be used when displaying the message to the user.
BynderException::displayMessage public function Displays message to the user.
BynderException::logException public function Logs exception into Drupal's log.
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
UnableToAddUsageException::__construct public function Constructs UnableToAddUsageException. Overrides BynderException::__construct