From a187b2cedc11e4838a22d5118c72650e0e7793fa Mon Sep 17 00:00:00 2001 From: tuomaspelkonen Date: Tue, 14 Jun 2011 14:01:47 -0700 Subject: [PATCH] Log the update test result error instead of throwing an exception. Summary: For some unknown reasons, our test framework fails to update test results occasionally. Instead of throwing a nasty exception, log the error message. This will help us to figure out the real reason behind the error. Test Plan: arc lint. Reviewed By: epriestley Reviewers: jungejason, epriestley CC: epriestley, aran Differential Revision: 463 --- .../ConduitAPI_differential_updateunitresults_Method.php | 5 +++-- .../method/differential/updateunitresults/__init__.php | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/applications/conduit/method/differential/updateunitresults/ConduitAPI_differential_updateunitresults_Method.php b/src/applications/conduit/method/differential/updateunitresults/ConduitAPI_differential_updateunitresults_Method.php index ae4f5c343e..97eb8b3d84 100644 --- a/src/applications/conduit/method/differential/updateunitresults/ConduitAPI_differential_updateunitresults_Method.php +++ b/src/applications/conduit/method/differential/updateunitresults/ConduitAPI_differential_updateunitresults_Method.php @@ -41,7 +41,6 @@ extends ConduitAPIMethod { return array( 'ERR_BAD_DIFF' => 'Bad diff ID.', 'ERR_NO_RESULTS' => 'Could not find the postponed test', - 'ERR_BAD_FILE' => 'No results for given file', ); } @@ -88,7 +87,9 @@ extends ConduitAPIMethod { unset($unit_result); if (!$unit_status) { - throw new ConduitException('ERR_BAD_FILE'); + phlog("Could not update test results: {$diff_id} {$file} {$name}". + " {$result} {$message}"); + return; } $diff_property->setData($unit_results); diff --git a/src/applications/conduit/method/differential/updateunitresults/__init__.php b/src/applications/conduit/method/differential/updateunitresults/__init__.php index d0e80055ee..405d942cbc 100644 --- a/src/applications/conduit/method/differential/updateunitresults/__init__.php +++ b/src/applications/conduit/method/differential/updateunitresults/__init__.php @@ -13,6 +13,7 @@ phutil_require_module('phabricator', 'applications/differential/constants/unitte phutil_require_module('phabricator', 'applications/differential/storage/diff'); phutil_require_module('phabricator', 'applications/differential/storage/diffproperty'); +phutil_require_module('phutil', 'error'); phutil_require_module('phutil', 'utils');