Skip to content

Commit

Permalink
Stop exceptions from breaking the watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
thewilkybarkid committed Dec 5, 2018
1 parent 009399c commit f54a1a5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/PatternLab/Watcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,15 @@ private function updateSite($fileName,$message,$verbose = true) {
Annotations::clear();

$g = new Generator();
$g->generate($options);
try {
$g->generate($options);
} catch (\Exception $e) {
Console::writeWarning("Failed on update to ".$fileName);
Console::writeWarning($e->getMessage());
} catch (\Throwable $e) {
Console::writeWarning("Failed on update to ".$fileName);
Console::writeWarning($e->getMessage());
}

}

Expand Down

0 comments on commit f54a1a5

Please sign in to comment.