Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15399145
D21699.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
13 KB
Referenced Files
None
Subscribers
None
D21699.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1524,6 +1524,7 @@
'HarbormasterManagementUpdateWorkflow' => 'applications/harbormaster/management/HarbormasterManagementUpdateWorkflow.php',
'HarbormasterManagementWorkflow' => 'applications/harbormaster/management/HarbormasterManagementWorkflow.php',
'HarbormasterManagementWriteLogWorkflow' => 'applications/harbormaster/management/HarbormasterManagementWriteLogWorkflow.php',
+ 'HarbormasterMessageException' => 'applications/harbormaster/exception/HarbormasterMessageException.php',
'HarbormasterMessageType' => 'applications/harbormaster/engine/HarbormasterMessageType.php',
'HarbormasterObject' => 'applications/harbormaster/storage/HarbormasterObject.php',
'HarbormasterOtherBuildStepGroup' => 'applications/harbormaster/stepgroup/HarbormasterOtherBuildStepGroup.php',
@@ -1541,7 +1542,6 @@
'HarbormasterQueryBuildsConduitAPIMethod' => 'applications/harbormaster/conduit/HarbormasterQueryBuildsConduitAPIMethod.php',
'HarbormasterQueryBuildsSearchEngineAttachment' => 'applications/harbormaster/engineextension/HarbormasterQueryBuildsSearchEngineAttachment.php',
'HarbormasterRemarkupRule' => 'applications/harbormaster/remarkup/HarbormasterRemarkupRule.php',
- 'HarbormasterRestartException' => 'applications/harbormaster/exception/HarbormasterRestartException.php',
'HarbormasterRunBuildPlansHeraldAction' => 'applications/harbormaster/herald/HarbormasterRunBuildPlansHeraldAction.php',
'HarbormasterSchemaSpec' => 'applications/harbormaster/storage/HarbormasterSchemaSpec.php',
'HarbormasterScratchTable' => 'applications/harbormaster/storage/HarbormasterScratchTable.php',
@@ -7784,6 +7784,7 @@
'HarbormasterManagementUpdateWorkflow' => 'HarbormasterManagementWorkflow',
'HarbormasterManagementWorkflow' => 'PhabricatorManagementWorkflow',
'HarbormasterManagementWriteLogWorkflow' => 'HarbormasterManagementWorkflow',
+ 'HarbormasterMessageException' => 'Exception',
'HarbormasterMessageType' => 'Phobject',
'HarbormasterObject' => 'HarbormasterDAO',
'HarbormasterOtherBuildStepGroup' => 'HarbormasterBuildStepGroup',
@@ -7801,7 +7802,6 @@
'HarbormasterQueryBuildsConduitAPIMethod' => 'HarbormasterConduitAPIMethod',
'HarbormasterQueryBuildsSearchEngineAttachment' => 'PhabricatorSearchEngineAttachment',
'HarbormasterRemarkupRule' => 'PhabricatorObjectRemarkupRule',
- 'HarbormasterRestartException' => 'Exception',
'HarbormasterRunBuildPlansHeraldAction' => 'HeraldAction',
'HarbormasterSchemaSpec' => 'PhabricatorConfigSchemaSpec',
'HarbormasterScratchTable' => 'HarbormasterDAO',
diff --git a/src/applications/harbormaster/controller/HarbormasterBuildActionController.php b/src/applications/harbormaster/controller/HarbormasterBuildActionController.php
--- a/src/applications/harbormaster/controller/HarbormasterBuildActionController.php
+++ b/src/applications/harbormaster/controller/HarbormasterBuildActionController.php
@@ -41,7 +41,7 @@
try {
$xaction->assertCanSendMessage($viewer, $build);
- } catch (HarbormasterRestartException $ex) {
+ } catch (HarbormasterMessageException $ex) {
return $this->newDialog()
->setTitle($ex->getTitle())
->appendChild($ex->getBody())
diff --git a/src/applications/harbormaster/controller/HarbormasterBuildableActionController.php b/src/applications/harbormaster/controller/HarbormasterBuildableActionController.php
--- a/src/applications/harbormaster/controller/HarbormasterBuildableActionController.php
+++ b/src/applications/harbormaster/controller/HarbormasterBuildableActionController.php
@@ -43,7 +43,7 @@
try {
$message->assertCanSendMessage($viewer, $build);
$can_send[$key] = $build;
- } catch (HarbormasterRestartException $ex) {
+ } catch (HarbormasterMessageException $ex) {
$exception = $ex;
}
diff --git a/src/applications/harbormaster/exception/HarbormasterRestartException.php b/src/applications/harbormaster/exception/HarbormasterMessageException.php
rename from src/applications/harbormaster/exception/HarbormasterRestartException.php
rename to src/applications/harbormaster/exception/HarbormasterMessageException.php
--- a/src/applications/harbormaster/exception/HarbormasterRestartException.php
+++ b/src/applications/harbormaster/exception/HarbormasterMessageException.php
@@ -1,6 +1,6 @@
<?php
-final class HarbormasterRestartException extends Exception {
+final class HarbormasterMessageException extends Exception {
private $title;
private $body = array();
diff --git a/src/applications/harbormaster/management/HarbormasterManagementRestartWorkflow.php b/src/applications/harbormaster/management/HarbormasterManagementRestartWorkflow.php
--- a/src/applications/harbormaster/management/HarbormasterManagementRestartWorkflow.php
+++ b/src/applications/harbormaster/management/HarbormasterManagementRestartWorkflow.php
@@ -70,7 +70,7 @@
try {
$message->assertCanSendMessage($viewer, $build);
- } catch (HarbormasterRestartException $ex) {
+ } catch (HarbormasterMessageException $ex) {
$this->logWarn(
pht('INVALID'),
$ex->newDisplayString());
diff --git a/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageAbortTransaction.php b/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageAbortTransaction.php
--- a/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageAbortTransaction.php
+++ b/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageAbortTransaction.php
@@ -88,14 +88,14 @@
HarbormasterBuild $build) {
if ($build->isAutobuild()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Abort Build'),
pht(
'You can not abort a build that uses an autoplan.'));
}
if ($build->isComplete()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Abort Build'),
pht(
'You can not abort this biuld because it is already complete.'));
@@ -107,7 +107,7 @@
HarbormasterBuild $build) {
if ($build->isAborting()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Abort Build'),
pht(
'You can not abort this build because it is already aborting.'));
diff --git a/src/applications/harbormaster/xaction/build/HarbormasterBuildMessagePauseTransaction.php b/src/applications/harbormaster/xaction/build/HarbormasterBuildMessagePauseTransaction.php
--- a/src/applications/harbormaster/xaction/build/HarbormasterBuildMessagePauseTransaction.php
+++ b/src/applications/harbormaster/xaction/build/HarbormasterBuildMessagePauseTransaction.php
@@ -83,19 +83,19 @@
HarbormasterBuild $build) {
if ($build->isAutobuild()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Pause Build'),
pht('You can not pause a build that uses an autoplan.'));
}
if ($build->isPaused()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Pause Build'),
pht('You can not pause this build because it is already paused.'));
}
if ($build->isComplete()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Pause Build'),
pht('You can not pause this build because it has already completed.'));
}
@@ -106,19 +106,19 @@
HarbormasterBuild $build) {
if ($build->isPausing()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Pause Build'),
pht('You can not pause this build because it is already pausing.'));
}
if ($build->isRestarting()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Pause Build'),
pht('You can not pause this build because it is already restarting.'));
}
if ($build->isAborting()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Pause Build'),
pht('You can not pause this build because it is already aborting.'));
}
diff --git a/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageRestartTransaction.php b/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageRestartTransaction.php
--- a/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageRestartTransaction.php
+++ b/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageRestartTransaction.php
@@ -105,7 +105,7 @@
HarbormasterBuild $build) {
if ($build->isAutobuild()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Can Not Restart Autobuild'),
pht(
'This build can not be restarted because it is an automatic '.
@@ -118,7 +118,7 @@
// See T13526. Users who can't see the "BuildPlan" can end up here with
// no object. This is highly questionable.
if (!$plan) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('No Build Plan Permission'),
pht(
'You can not restart this build because you do not have '.
@@ -132,7 +132,7 @@
$never_restartable = HarbormasterBuildPlanBehavior::RESTARTABLE_NEVER;
$is_never = ($option_key === $never_restartable);
if ($is_never) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Build Plan Prevents Restart'),
pht(
'This build can not be restarted because the build plan is '.
@@ -143,7 +143,7 @@
$is_failed = ($option_key === $failed_restartable);
if ($is_failed) {
if (!$this->isFailed()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Only Restartable if Failed'),
pht(
'This build can not be restarted because the build plan is '.
@@ -159,7 +159,7 @@
HarbormasterBuild $build) {
if ($build->isRestarting()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Already Restarting'),
pht(
'This build is already restarting. You can not reissue a restart '.
diff --git a/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageResumeTransaction.php b/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageResumeTransaction.php
--- a/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageResumeTransaction.php
+++ b/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageResumeTransaction.php
@@ -75,14 +75,14 @@
HarbormasterBuild $build) {
if ($build->isAutobuild()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Resume Build'),
pht(
'You can not resume a build that uses an autoplan.'));
}
if (!$build->isPaused() && !$build->isPausing()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Resume Build'),
pht(
'You can not resume this build because it is not paused. You can '.
@@ -96,20 +96,20 @@
HarbormasterBuild $build) {
if ($build->isResuming()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Resume Build'),
pht(
'You can not resume this build beacuse it is already resuming.'));
}
if ($build->isRestarting()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Resume Build'),
pht('You can not resume this build because it is already restarting.'));
}
if ($build->isAborting()) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Unable to Resume Build'),
pht('You can not resume this build because it is already aborting.'));
}
diff --git a/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageTransaction.php b/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageTransaction.php
--- a/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageTransaction.php
+++ b/src/applications/harbormaster/xaction/build/HarbormasterBuildMessageTransaction.php
@@ -86,7 +86,7 @@
try {
$this->assertCanApplyMessage($viewer, $build);
return true;
- } catch (HarbormasterRestartException $ex) {
+ } catch (HarbormasterMessageException $ex) {
return false;
}
}
@@ -98,7 +98,7 @@
try {
$this->assertCanSendMessage($viewer, $build);
return true;
- } catch (HarbormasterRestartException $ex) {
+ } catch (HarbormasterMessageException $ex) {
return false;
}
}
@@ -117,7 +117,7 @@
// See T13526. Users without permission to access the build plan can
// currently end up here with no "BuildPlan" object.
if (!$plan) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('No Build Plan Permission'),
pht(
'You can not issue this command because you do not have '.
@@ -133,7 +133,7 @@
$plan,
PhabricatorPolicyCapability::CAN_EDIT);
} catch (PhabricatorPolicyException $ex) {
- throw new HarbormasterRestartException(
+ throw new HarbormasterMessageException(
pht('Insufficent Build Plan Permission'),
pht(
'The build plan for this build is configured to prevent '.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 3:05 AM (1 d, 17 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704321
Default Alt Text
D21699.diff (13 KB)
Attached To
Mode
D21699: Rename "HarbormasterRestartException" to "HarbormasterMessageException"
Attached
Detach File
Event Timeline
Log In to Comment