mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 23:32:40 +01:00
Make ./bin/diviner generate
more fault tolerant
Summary: Allow `./bin/diviner generate` to continue even if there is an exception throw processing an atom. This allows Diviner documentation to be generated for PHP source code that cannot be parsed with XHPAST. Test Plan: Ran `./bin/diviner generate` on a PHP repository which previously throw an `XHPASTSyntaxErrorException`. Reviewers: btrahan, epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D10803
This commit is contained in:
parent
97f05d6ab8
commit
bcd78716df
1 changed files with 10 additions and 6 deletions
|
@ -334,6 +334,7 @@ final class DivinerGenerateWorkflow extends DivinerWorkflow {
|
|||
$bar = id(new PhutilConsoleProgressBar())
|
||||
->setTotal(count($futures));
|
||||
foreach (Futures($futures)->limit(4) as $key => $future) {
|
||||
try {
|
||||
$atoms = $future->resolveJSON();
|
||||
|
||||
foreach ($atoms as $atom) {
|
||||
|
@ -343,6 +344,9 @@ final class DivinerGenerateWorkflow extends DivinerWorkflow {
|
|||
}
|
||||
$atom_cache->addAtom($atom);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
phlog($e);
|
||||
}
|
||||
|
||||
$bar->update(1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue