function FileValidationException::__construct

Same name in other branches
  1. 9 core/modules/file/src/Upload/FileValidationException.php \Drupal\file\Upload\FileValidationException::__construct()
  2. 10 core/modules/file/src/Upload/FileValidationException.php \Drupal\file\Upload\FileValidationException::__construct()

Constructs a new FileValidationException.

Parameters

string $message: The message.

string $file_name: The file name.

array $errors: The validation errors.

File

core/modules/file/src/Upload/FileValidationException.php, line 34

Class

FileValidationException
Provides an exception for upload validation errors.

Namespace

Drupal\file\Upload

Code

public function __construct(string $message, string $file_name, array $errors) {
    parent::__construct($message, 0, NULL);
    $this->fileName = $file_name;
    $this->errors = $errors;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.