From ebdcedc87f2755085115bc05a2799e9702ded42c Mon Sep 17 00:00:00 2001 From: tuomaspelkonen Date: Fri, 15 Apr 2011 14:31:54 -0700 Subject: [PATCH] Better error messages for nonexistent CCs, reviewers, etc. in arc Summary: The existing message is confusing and might cause people to think that there is something wrong in the field name, e.g., 'CC' instead of the value. Test Plan: Tested by putting random crap in CC and Reviewers and made sure the error message was using the new format. Reviewed By: jungejason Reviewers: epriestley, jungejason CC: mdevine, jungejason Differential Revision: 145 --- .../parser/commitmessage/DifferentialCommitMessage.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/applications/differential/parser/commitmessage/DifferentialCommitMessage.php b/src/applications/differential/parser/commitmessage/DifferentialCommitMessage.php index 726b7d1ac3..ba3c5500d2 100644 --- a/src/applications/differential/parser/commitmessage/DifferentialCommitMessage.php +++ b/src/applications/differential/parser/commitmessage/DifferentialCommitMessage.php @@ -240,7 +240,7 @@ class DifferentialCommitMessage { $phid = idx($users, $name); if (!$phid) { throw new DifferentialCommitMessageParserException( - "Commit message references nonexistent 'Reviewer': ".$name); + "Commit message references nonexistent 'Reviewer' value '".$name."'"); } $reviewer_phids[] = $phid; } @@ -251,7 +251,8 @@ class DifferentialCommitMessage { $phid = idx($users, $name); if (!$phid) { throw new DifferentialCommitMessageParserException( - "Commit message references nonexistent 'Reviewed by': ".$name); + "Commit message references nonexistent 'Reviewed by' value '". + $name."'"); } $reviewed_by_phids[] = $phid; } @@ -265,7 +266,7 @@ class DifferentialCommitMessage { } if (!$phid) { throw new DifferentialCommitMessageParserException( - "Commit message references nonexistent 'CC': ".$name); + "Commit message references nonexistent 'CC' value '".$name."'"); } $cc_phids[] = $phid; }