Skip to content

Commit 69c7815

Browse files
committed
providing a cleaner error message
1 parent 6fe07d6 commit 69c7815

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/PatternLab/PatternEngine/Twig/TwigUtil.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818

1919
class TwigUtil {
2020

21+
/**
22+
* Write a warning if a dir doesn't exist
23+
* @param {String} the dir that doesn't exist
24+
*/
25+
protected static function dirNotExist($dir) {
26+
$dirHR = Console::getHumanReadablePath($dir);
27+
Console::writeWarning("the path <path>".$dirHR."</path> doesn't exist so filters won't be loaded...");
28+
}
29+
2130
/**
2231
* Load custom date formats for Twig
2332
* @param {Instance} an instance of the twig engine

0 commit comments

Comments
 (0)