class UnknownLibraryVersionException in Libraries API 8.3
Provides an exception for libraries whose version has not been detected.
Hierarchy
- class \Drupal\libraries\ExternalLibrary\Exception\UnknownLibraryVersionException extends \Drupal\libraries\ExternalLibrary\Exception\RuntimeException implements LibraryAccessorInterface uses LibraryAccessorTrait
Expanded class hierarchy of UnknownLibraryVersionException
4 files declare their use of UnknownLibraryVersionException
- LinePatternDetector.php in src/
Plugin/ libraries/ VersionDetector/ LinePatternDetector.php - LinePatternDetectorTest.php in tests/
src/ Unit/ Plugin/ libraries/ VersionDetector/ LinePatternDetectorTest.php - StaticDetector.php in src/
Plugin/ libraries/ VersionDetector/ StaticDetector.php - VersionedLibraryTrait.php in src/
ExternalLibrary/ Version/ VersionedLibraryTrait.php
File
- src/
ExternalLibrary/ Exception/ UnknownLibraryVersionException.php, line 12
Namespace
Drupal\libraries\ExternalLibrary\ExceptionView source
class UnknownLibraryVersionException extends \RuntimeException implements LibraryAccessorInterface {
use LibraryAccessorTrait;
/**
* Constructs a library exception.
*
* @param \Drupal\libraries\ExternalLibrary\Version\VersionedLibraryInterface $library
* The library.
* @param string $message
* (optional) The exception message.
* @param int $code
* (optional) The error code.
* @param \Exception $previous
* (optional) The previous exception.
*/
public function __construct(VersionedLibraryInterface $library, $message = '', $code = 0, \Exception $previous = NULL) {
$this->library = $library;
$message = $message ?: "The version of library '{$this->library->getId()}' could not be detected.";
parent::__construct($message, $code, $previous);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LibraryAccessorTrait:: |
protected | property | The library. | |
LibraryAccessorTrait:: |
public | function | Returns the library. | |
UnknownLibraryVersionException:: |
public | function | Constructs a library exception. |