You are here

public function UploadPermissionException::__construct in Bynder 8.2

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

Constructs UploadFailedException.

Parameters

string $original_message: Message that was originally thrown from the upload system.

Overrides BynderException::__construct

File

src/Exception/UploadPermissionException.php, line 16

Class

UploadPermissionException
Exception indicating that the User doesn't have upload permissions.

Namespace

Drupal\bynder\Exception

Code

public function __construct($original_message) {
  $log_message = "Unable to upload files to Bynder. Make sure your user account has enough permissions : @message";
  $log_message_args = [
    '@message' => $original_message,
  ];
  $admin_message = $this
    ->t($log_message, $log_message_args);
  $message = $this
    ->t("Unable to upload files to Bynder. Make sure your user account has enough permissions.");
  parent::__construct($message, $admin_message, $log_message, $log_message_args);
}