Skip to content
Snippets Groups Projects
Commit f7c12564 authored by André Matheus Pedrosa's avatar André Matheus Pedrosa Committed by Joseph Olstad
Browse files

Issue #3256961 by urvashi_vora, andregp, tmaiochi: Throw an exception on...

Issue #3256961 by urvashi_vora, andregp, tmaiochi: Throw an exception on LocalRemoteAssetTrait.php function
parent 2178107c
No related branches found
No related tags found
No related merge requests found
......@@ -42,8 +42,8 @@ trait LocalRemoteAssetTrait {
/** @var \Drupal\libraries\ExternalLibrary\Local\LocalLibraryInterface|\Drupal\libraries\ExternalLibrary\Remote\RemoteLibraryInterface $this */
if ($this->isInstalled()) {
// LocalLibraryInterface::getLocalPath() returns the path relative to the
// app root. In order for the core core asset system to register the path
// as relative to the app root, a leading slash is required.
// app root. In order for the core asset system to register the path as
// relative to the app root, a leading slash is required.
/** @see \Drupal\Core\Asset\LibraryDiscoveryParser::buildByExtension() */
return '/' . $this->getLocalPath();
}
......@@ -51,7 +51,9 @@ trait LocalRemoteAssetTrait {
return $this->getRemoteUrl();
}
else {
// @todo Throw an exception.
throw new \Exception(
"Library path isn't set and library doesn't have remote url."
);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment