class LibraryDefinitionNotFoundException in Libraries API 8.3
Provides an exception for a library definition that cannot be found.
Hierarchy
- class \Drupal\libraries\ExternalLibrary\Exception\LibraryDefinitionNotFoundException extends \Drupal\libraries\ExternalLibrary\Exception\RuntimeException implements LibraryIdAccessorInterface uses LibraryIdAccessorTrait
Expanded class hierarchy of LibraryDefinitionNotFoundException
5 files declare their use of LibraryDefinitionNotFoundException
- ChainDefinitionDiscovery.php in src/
ExternalLibrary/ Definition/ ChainDefinitionDiscovery.php - FileDefinitionDiscovery.php in src/
ExternalLibrary/ Definition/ FileDefinitionDiscovery.php - FileDefinitionDiscoveryBase.php in src/
ExternalLibrary/ Definition/ FileDefinitionDiscoveryBase.php - GuzzleDefinitionDiscovery.php in src/
ExternalLibrary/ Definition/ GuzzleDefinitionDiscovery.php - LibraryTypeKernelTestBase.php in tests/
src/ Kernel/ LibraryTypeKernelTestBase.php
File
- src/
ExternalLibrary/ Exception/ LibraryDefinitionNotFoundException.php, line 11
Namespace
Drupal\libraries\ExternalLibrary\ExceptionView source
class LibraryDefinitionNotFoundException extends \RuntimeException implements LibraryIdAccessorInterface {
use LibraryIdAccessorTrait;
/**
* Constructs a library exception.
*
* @param string $library_id
* The library ID.
* @param string $message
* (optional) The exception message.
* @param int $code
* (optional) The error code.
* @param \Exception $previous
* (optional) The previous exception.
*/
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);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LibraryDefinitionNotFoundException:: |
public | function | Constructs a library exception. | |
LibraryIdAccessorTrait:: |
protected | property | The ID of the library. | |
LibraryIdAccessorTrait:: |
public | function | Returns the ID of the library. |