You are here

public function LibraryDefinitionNotFoundException::__construct in Libraries API 8.3

Constructs a library exception.

Parameters

string $library_id: The library ID.

string $message: (optional) The exception message.

int $code: (optional) The error code.

\Exception $previous: (optional) The previous exception.

File

src/ExternalLibrary/Exception/LibraryDefinitionNotFoundException.php, line 27

Class

LibraryDefinitionNotFoundException
Provides an exception for a library definition that cannot be found.

Namespace

Drupal\libraries\ExternalLibrary\Exception

Code

public function __construct($library_id, $message = '', $code = 0, \Exception $previous = NULL) {
  $this->libraryId = (string) $library_id;
  $message = $message ?: "The library definition for the library '{$this->libraryId}' could not be found.";
  parent::__construct($message, $code, $previous);
}