Skip to content

Commit

Permalink
Catch parsing errors (logging missing)
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaeu committed May 10, 2017
1 parent 26acf1b commit 1f00b7b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Analyser/StaticAnalyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ public function __construct(
public function analyse(PhpFileSet $files) : DependencyMap
{
$files->each(function (PhpFile $file) {
$this->nodeTraverser->traverse(
$this->parser->parse($file->code())
);
try {
$this->nodeTraverser->traverse(
$this->parser->parse($file->code())
);
} catch (\Throwable $e) {
}
});

return $this->dependencyInspectionVisitor->dependencies();
Expand Down

0 comments on commit 1f00b7b

Please sign in to comment.