Skip to content

Commit fdbe0a7

Browse files
authored
Merge pull request #100 from stof/patch-1
Catch the appropriate exception from scssphp
2 parents fc92d9d + 5d3786b commit fdbe0a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Utils/StyleBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use DOMElement;
88
use Exception;
99
use ScssPhp\ScssPhp\Compiler as ScssCompiler;
10-
use ScssPhp\ScssPhp\Exception\CompilerException;
10+
use ScssPhp\ScssPhp\Exception\SassException;
1111

1212
class StyleBuilder
1313
{
@@ -88,7 +88,7 @@ public function compile(?DOMElement $styleElement, ?string $path = null): ?strin
8888
$style = str_replace('/deep/', '__vue_to_twig_deep_placeholder__', $style);
8989
$style = $this->scssCompiler->compile($this->scssData . ' ' . $style, $path);
9090
$style = str_replace('__vue_to_twig_deep_placeholder__', '/deep/', $style);
91-
} catch (CompilerException $e) {
91+
} catch (SassException $e) {
9292
$style = "\n/* Warning: " . $e->getMessage() . " */\n";
9393
}
9494
}

0 commit comments

Comments
 (0)