1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 14:52:40 +01:00

Pass key to aggregate exception

Summary: This information may be quite useful.

Test Plan: Threw exception from license linter.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3764
This commit is contained in:
vrana 2012-10-20 07:11:02 -07:00
parent 77af6fb35d
commit 835f2afb5d

View file

@ -197,7 +197,7 @@ abstract class ArcanistLintEngine {
} }
$exceptions = array(); $exceptions = array();
foreach ($linters as $linter) { foreach ($linters as $linter_name => $linter) {
try { try {
$linter->setEngine($this); $linter->setEngine($this);
if (!$linter->canRun()) { if (!$linter->canRun()) {
@ -238,7 +238,10 @@ abstract class ArcanistLintEngine {
$result->addMessage($message); $result->addMessage($message);
} }
} catch (Exception $ex) { } catch (Exception $ex) {
$exceptions[] = $ex; if (!is_string($linter_name)) {
$linter_name = get_class($linter);
}
$exceptions[$linter_name] = $ex;
} }
} }