LessCompiler: Catch only parser exceptions

This commit is contained in:
Johannes Meyer 2022-02-10 10:50:39 +01:00
parent 6516eafc6c
commit 6dc5c50618
1 changed files with 2 additions and 2 deletions

View File

@ -3,9 +3,9 @@
namespace Icinga\Web;
use Exception;
use Icinga\Application\Logger;
use Icinga\Util\LessParser;
use Less_Exception_Parser;
/**
* Compile LESS into CSS
@ -229,7 +229,7 @@ class LessCompiler
'\2 \1',
$this->lessc->compile($this->source)
);
} catch (Exception $e) {
} catch (Less_Exception_Parser $e) {
$excerpt = substr($this->source, $e->index - 500, 1000);
$lines = [];