mirror of
https://github.com/flarum/framework.git
synced 2025-01-06 10:33:46 +08:00
Gracefully fail for LESS compilation errors, not just parsing ones
This commit is contained in:
parent
6cc3dd4dea
commit
f47be34df0
|
@ -45,18 +45,18 @@ class LessCompiler extends RevisionCompiler
|
||||||
'cache_dir' => $this->cachePath
|
'cache_dir' => $this->cachePath
|
||||||
]);
|
]);
|
||||||
|
|
||||||
foreach ($this->files as $file) {
|
try {
|
||||||
$parser->parseFile($file);
|
foreach ($this->files as $file) {
|
||||||
}
|
$parser->parseFile($file);
|
||||||
|
|
||||||
foreach ($this->strings as $callback) {
|
|
||||||
try {
|
|
||||||
$parser->parse($callback());
|
|
||||||
} catch (Less_Exception_Parser $e) {
|
|
||||||
// TODO: log an error somewhere?
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return $parser->getCss();
|
foreach ($this->strings as $callback) {
|
||||||
|
$parser->parse($callback());
|
||||||
|
}
|
||||||
|
|
||||||
|
return $parser->getCss();
|
||||||
|
} catch (Less_Exception_Parser $e) {
|
||||||
|
// TODO: log an error somewhere?
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user