Skip to content
Snippets Groups Projects
Commit be615bf5 authored by AlanDixon's avatar AlanDixon
Browse files

put asset rendering call into a try/catch

parent 338ca6e9
Branches
Tags
No related merge requests found
......@@ -188,10 +188,14 @@ class AssetBuilder {
if (!file_exists($this->getCachePath())) {
mkdir($this->getCachePath());
}
$rendered = $this->render($name, $params);
file_put_contents($this->getCachePath($fileName), $rendered['content']);
return $fileName;
try {
$rendered = $this->render($name, $params);
file_put_contents($this->getCachePath($fileName), $rendered['content']);
return $fileName;
}
catch (UnknownAssetException $e) {
// ignore possibly missing asset
}
}
return $fileName;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment