mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 02:32:42 +01:00
Pass key to aggregate exception
Summary: This information may be quite useful. Test Plan: Uploaded file. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3763
This commit is contained in:
parent
67498f3334
commit
b97cfed23a
2 changed files with 14 additions and 26 deletions
|
@ -176,18 +176,18 @@ final class PhabricatorFile extends PhabricatorFileDAO {
|
||||||
// We stored the file somewhere so stop trying to write it to other
|
// We stored the file somewhere so stop trying to write it to other
|
||||||
// places.
|
// places.
|
||||||
break;
|
break;
|
||||||
} catch (Exception $ex) {
|
|
||||||
if ($ex instanceof PhabricatorFileStorageConfigurationException) {
|
} catch (PhabricatorFileStorageConfigurationException $ex) {
|
||||||
// If an engine is outright misconfigured (or misimplemented), raise
|
// If an engine is outright misconfigured (or misimplemented), raise
|
||||||
// that immediately since it probably needs attention.
|
// that immediately since it probably needs attention.
|
||||||
throw $ex;
|
throw $ex;
|
||||||
}
|
|
||||||
|
|
||||||
|
} catch (Exception $ex) {
|
||||||
// If an engine doesn't work, keep trying all the other valid engines
|
// If an engine doesn't work, keep trying all the other valid engines
|
||||||
// in case something else works.
|
// in case something else works.
|
||||||
phlog($ex);
|
phlog($ex);
|
||||||
|
|
||||||
$exceptions[] = $ex;
|
$exceptions[$engine_class] = $ex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,26 +70,14 @@ widths on different languages:
|
||||||
|
|
||||||
$linters = array();
|
$linters = array();
|
||||||
|
|
||||||
$text_80col_linter = new ArcanistTextLinter();
|
|
||||||
$linters[] = $text_80col_linter;
|
|
||||||
|
|
||||||
$text_120col_linter = new ArcanistTextLinter();
|
|
||||||
$text_120col_linter->setMaxLineLength(120);
|
|
||||||
$linters[] = $text_120col_linter;
|
|
||||||
|
|
||||||
foreach ($paths as $path) {
|
|
||||||
|
|
||||||
// Warn on JS/CSS lines longer than 80 columns.
|
// Warn on JS/CSS lines longer than 80 columns.
|
||||||
if (preg_match('/\.(js|css)$/', $path)) {
|
$linters['TextLinter80Col'] = id(new ArcanistTextLinter())
|
||||||
$text_80col_linter->addPath($path);
|
->setPaths(preg_grep('/\.(js|css)$/', $paths));
|
||||||
}
|
|
||||||
|
|
||||||
// Warn on Java lines longer than 120 columns.
|
// Warn on Java lines longer than 120 columns.
|
||||||
if (preg_match('/\.java$/', $path)) {
|
$linters['TextLinter120Col'] = id(new ArcanistTextLinter())
|
||||||
$text_120col_linter->addPath($path);
|
->setMaxLineLength(120)
|
||||||
}
|
->setPaths(preg_grep('/\.(java)$/', $paths));
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue