Page MenuHomePhabricator

D10150.id24433.diff
No OneTemporary

D10150.id24433.diff

diff --git a/resources/sql/patches/090.forceuniqueprojectnames.php b/resources/sql/patches/090.forceuniqueprojectnames.php
--- a/resources/sql/patches/090.forceuniqueprojectnames.php
+++ b/resources/sql/patches/090.forceuniqueprojectnames.php
@@ -58,7 +58,7 @@
$project->getID());
unset($update[$key]);
echo "okay.\n";
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
echo "failed, will retry.\n";
}
}
diff --git a/resources/sql/patches/20130913.maniphest.1.migratesearch.php b/resources/sql/patches/20130913.maniphest.1.migratesearch.php
--- a/resources/sql/patches/20130913.maniphest.1.migratesearch.php
+++ b/resources/sql/patches/20130913.maniphest.1.migratesearch.php
@@ -187,7 +187,7 @@
try {
$saved->save();
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
// Ignore this, we just have duplicate saved queries.
}
diff --git a/src/__tests__/PhabricatorInfrastructureTestCase.php b/src/__tests__/PhabricatorInfrastructureTestCase.php
--- a/src/__tests__/PhabricatorInfrastructureTestCase.php
+++ b/src/__tests__/PhabricatorInfrastructureTestCase.php
@@ -113,11 +113,11 @@
$caught = null;
try {
qsprintf($conn_r, 'SELECT %s', $gclef);
- } catch (AphrontQueryCharacterSetException $ex) {
+ } catch (AphrontCharacterSetQueryException $ex) {
$caught = $ex;
}
- $this->assertTrue($caught instanceof AphrontQueryCharacterSetException);
+ $this->assertTrue($caught instanceof AphrontCharacterSetQueryException);
}
}
diff --git a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
--- a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
+++ b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
@@ -250,7 +250,7 @@
$class = get_class($ex);
$message = $ex->getMessage();
- if ($ex instanceof AphrontQuerySchemaException) {
+ if ($ex instanceof AphrontSchemaQueryException) {
$message .=
"\n\n".
"NOTE: This usually indicates that the MySQL schema has not been ".
diff --git a/src/applications/auth/controller/PhabricatorAuthRegisterController.php b/src/applications/auth/controller/PhabricatorAuthRegisterController.php
--- a/src/applications/auth/controller/PhabricatorAuthRegisterController.php
+++ b/src/applications/auth/controller/PhabricatorAuthRegisterController.php
@@ -304,7 +304,7 @@
}
return $this->loginUser($user);
- } catch (AphrontQueryDuplicateKeyException $exception) {
+ } catch (AphrontDuplicateKeyQueryException $exception) {
$same_username = id(new PhabricatorUser())->loadOneWhere(
'userName = %s',
$user->getUserName());
diff --git a/src/applications/config/check/PhabricatorSetupCheckDatabase.php b/src/applications/config/check/PhabricatorSetupCheckDatabase.php
--- a/src/applications/config/check/PhabricatorSetupCheckDatabase.php
+++ b/src/applications/config/check/PhabricatorSetupCheckDatabase.php
@@ -30,7 +30,7 @@
try {
queryfx($conn_raw, 'SELECT 1');
- } catch (AphrontQueryConnectionException $ex) {
+ } catch (AphrontConnectionQueryException $ex) {
$message = pht(
"Unable to connect to MySQL!\n\n".
"%s\n\n".
diff --git a/src/applications/differential/storage/DifferentialDraft.php b/src/applications/differential/storage/DifferentialDraft.php
--- a/src/applications/differential/storage/DifferentialDraft.php
+++ b/src/applications/differential/storage/DifferentialDraft.php
@@ -16,7 +16,7 @@
->setAuthorPHID($author_phid)
->setDraftKey($draft_key)
->save();
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
// no worries
}
}
diff --git a/src/applications/herald/controller/HeraldRuleController.php b/src/applications/herald/controller/HeraldRuleController.php
--- a/src/applications/herald/controller/HeraldRuleController.php
+++ b/src/applications/herald/controller/HeraldRuleController.php
@@ -333,7 +333,7 @@
$rule->logEdit($request->getUser()->getPHID(), $edit_action);
$rule->saveTransaction();
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
$e_name = pht('Not Unique');
$errors[] = pht('Rule name is not unique. Choose a unique name.');
}
diff --git a/src/applications/macro/controller/PhabricatorMacroEditController.php b/src/applications/macro/controller/PhabricatorMacroEditController.php
--- a/src/applications/macro/controller/PhabricatorMacroEditController.php
+++ b/src/applications/macro/controller/PhabricatorMacroEditController.php
@@ -125,7 +125,7 @@
$view_uri = $this->getApplicationURI('/view/'.$original->getID().'/');
return id(new AphrontRedirectResponse())->setURI($view_uri);
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
throw $ex;
$errors[] = pht('Macro name is not unique!');
$e_name = pht('Duplicate');
diff --git a/src/applications/mailinglists/controller/PhabricatorMailingListsEditController.php b/src/applications/mailinglists/controller/PhabricatorMailingListsEditController.php
--- a/src/applications/mailinglists/controller/PhabricatorMailingListsEditController.php
+++ b/src/applications/mailinglists/controller/PhabricatorMailingListsEditController.php
@@ -67,7 +67,7 @@
$list->save();
return id(new AphrontRedirectResponse())
->setURI($this->getApplicationURI());
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
$e_email = pht('Duplicate');
$errors[] = pht('Another mailing list already uses that address.');
}
diff --git a/src/applications/owners/controller/PhabricatorOwnersEditController.php b/src/applications/owners/controller/PhabricatorOwnersEditController.php
--- a/src/applications/owners/controller/PhabricatorOwnersEditController.php
+++ b/src/applications/owners/controller/PhabricatorOwnersEditController.php
@@ -92,7 +92,7 @@
$package->save();
return id(new AphrontRedirectResponse())
->setURI('/owners/package/'.$package->getID().'/');
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
$e_name = pht('Duplicate');
$errors[] = pht('Package name must be unique.');
}
diff --git a/src/applications/people/controller/PhabricatorPeopleNewController.php b/src/applications/people/controller/PhabricatorPeopleNewController.php
--- a/src/applications/people/controller/PhabricatorPeopleNewController.php
+++ b/src/applications/people/controller/PhabricatorPeopleNewController.php
@@ -104,7 +104,7 @@
$response = id(new AphrontRedirectResponse())
->setURI('/p/'.$user->getUsername().'/');
return $response;
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
$errors[] = pht('Username and email must be unique.');
$same_username = id(new PhabricatorUser())
diff --git a/src/applications/people/controller/PhabricatorPeopleRenameController.php b/src/applications/people/controller/PhabricatorPeopleRenameController.php
--- a/src/applications/people/controller/PhabricatorPeopleRenameController.php
+++ b/src/applications/people/controller/PhabricatorPeopleRenameController.php
@@ -56,7 +56,7 @@
$new_uri = '/p/'.$v_username.'/';
return id(new AphrontRedirectResponse())->setURI($new_uri);
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
$e_username = pht('Not Unique');
$errors[] = pht('Another user already has that username.');
}
diff --git a/src/applications/people/editor/PhabricatorUserEditor.php b/src/applications/people/editor/PhabricatorUserEditor.php
--- a/src/applications/people/editor/PhabricatorUserEditor.php
+++ b/src/applications/people/editor/PhabricatorUserEditor.php
@@ -54,7 +54,7 @@
$user->save();
$email->setUserPHID($user->getPHID());
$email->save();
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
// We might have written the user but failed to write the email; if
// so, erase the IDs we attached.
$user->setID(null);
@@ -155,7 +155,7 @@
try {
$user->save();
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
$user->setUsername($old_username);
$user->killTransaction();
throw $ex;
@@ -365,7 +365,7 @@
try {
$email->save();
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
$user->endWriteLocking();
$user->killTransaction();
diff --git a/src/applications/people/lipsum/PhabricatorPeopleTestDataGenerator.php b/src/applications/people/lipsum/PhabricatorPeopleTestDataGenerator.php
--- a/src/applications/people/lipsum/PhabricatorPeopleTestDataGenerator.php
+++ b/src/applications/people/lipsum/PhabricatorPeopleTestDataGenerator.php
@@ -25,7 +25,7 @@
->createNewUser($user, $email_object);
return $user;
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
}
}
}
diff --git a/src/applications/phame/controller/blog/PhameBlogEditController.php b/src/applications/phame/controller/blog/PhameBlogEditController.php
--- a/src/applications/phame/controller/blog/PhameBlogEditController.php
+++ b/src/applications/phame/controller/blog/PhameBlogEditController.php
@@ -96,7 +96,7 @@
$blog->save();
return id(new AphrontRedirectResponse())
->setURI($this->getApplicationURI('blog/view/'.$blog->getID().'/'));
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
$errors[] = pht('Domain must be unique.');
$e_custom_domain = pht('Not Unique');
}
diff --git a/src/applications/phame/controller/post/PhamePostEditController.php b/src/applications/phame/controller/post/PhamePostEditController.php
--- a/src/applications/phame/controller/post/PhamePostEditController.php
+++ b/src/applications/phame/controller/post/PhamePostEditController.php
@@ -82,7 +82,7 @@
$uri = $this->getApplicationURI('/post/view/'.$post->getID().'/');
return id(new AphrontRedirectResponse())->setURI($uri);
- } catch (AphrontQueryDuplicateKeyException $e) {
+ } catch (AphrontDuplicateKeyQueryException $e) {
$e_phame_title = pht('Not Unique');
$errors[] = pht('Another post already uses this slug. '.
'Each post must have a unique slug.');
diff --git a/src/applications/phlux/controller/PhluxEditController.php b/src/applications/phlux/controller/PhluxEditController.php
--- a/src/applications/phlux/controller/PhluxEditController.php
+++ b/src/applications/phlux/controller/PhluxEditController.php
@@ -92,7 +92,7 @@
$editor->applyTransactions($var, $xactions);
$view_uri = $this->getApplicationURI('/view/'.$key.'/');
return id(new AphrontRedirectResponse())->setURI($view_uri);
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
$e_key = pht('Not Unique');
$errors[] = pht('Variable key must be unique.');
}
diff --git a/src/applications/phragment/controller/PhragmentSnapshotCreateController.php b/src/applications/phragment/controller/PhragmentSnapshotCreateController.php
--- a/src/applications/phragment/controller/PhragmentSnapshotCreateController.php
+++ b/src/applications/phragment/controller/PhragmentSnapshotCreateController.php
@@ -52,7 +52,7 @@
->setPrimaryFragmentPHID($fragment->getPHID())
->setName($v_name)
->save();
- } catch (AphrontQueryDuplicateKeyException $e) {
+ } catch (AphrontDuplicateKeyQueryException $e) {
$errors[] = pht('A snapshot with this name already exists.');
}
diff --git a/src/applications/releeph/controller/product/ReleephProductCreateController.php b/src/applications/releeph/controller/product/ReleephProductCreateController.php
--- a/src/applications/releeph/controller/product/ReleephProductCreateController.php
+++ b/src/applications/releeph/controller/product/ReleephProductCreateController.php
@@ -44,7 +44,7 @@
return id(new AphrontRedirectResponse())
->setURI($releeph_product->getURI());
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
$e_name = pht('Not Unique');
$errors[] = pht('Another product already uses this name.');
}
diff --git a/src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php b/src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php
--- a/src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php
+++ b/src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php
@@ -134,7 +134,7 @@
try {
$repository->save();
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
throw new ConduitException('ERR-DUPLICATE');
}
diff --git a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
--- a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
+++ b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
@@ -632,7 +632,7 @@
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
$commit->killTransaction();
// Ignore. This can happen because we discover the same new commit
// more than once when looking at history, or because of races or
diff --git a/src/applications/search/controller/PhabricatorSearchController.php b/src/applications/search/controller/PhabricatorSearchController.php
--- a/src/applications/search/controller/PhabricatorSearchController.php
+++ b/src/applications/search/controller/PhabricatorSearchController.php
@@ -59,7 +59,7 @@
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
try {
$saved->setID(null)->save();
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
// Ignore, this is just a repeated search.
}
unset($unguarded);
diff --git a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
--- a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
+++ b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
@@ -52,7 +52,7 @@
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
try {
$query->save();
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
// Ignore, this is just a repeated search.
}
unset($unguarded);
diff --git a/src/applications/settings/panel/PhabricatorSettingsPanelEmailAddresses.php b/src/applications/settings/panel/PhabricatorSettingsPanelEmailAddresses.php
--- a/src/applications/settings/panel/PhabricatorSettingsPanelEmailAddresses.php
+++ b/src/applications/settings/panel/PhabricatorSettingsPanelEmailAddresses.php
@@ -210,7 +210,7 @@
->addSubmitButton(pht('Done'));
return id(new AphrontDialogResponse())->setDialog($dialog);
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
$email = pht('Duplicate');
$errors[] = pht('Another user already has this email.');
}
diff --git a/src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php b/src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php
--- a/src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php
+++ b/src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php
@@ -103,7 +103,7 @@
$key->save();
return id(new AphrontRedirectResponse())
->setURI($this->getPanelURI());
- } catch (AphrontQueryDuplicateKeyException $ex) {
+ } catch (AphrontDuplicateKeyQueryException $ex) {
$e_key = pht('Duplicate');
$errors[] = pht('This public key is already associated with a user '.
'account.');
diff --git a/src/infrastructure/storage/__tests__/AphrontIsolatedDatabaseConnectionTestCase.php b/src/infrastructure/storage/__tests__/AphrontIsolatedDatabaseConnectionTestCase.php
--- a/src/infrastructure/storage/__tests__/AphrontIsolatedDatabaseConnectionTestCase.php
+++ b/src/infrastructure/storage/__tests__/AphrontIsolatedDatabaseConnectionTestCase.php
@@ -134,7 +134,7 @@
null,
$row,
'Expect fake row to exist only in isolation.');
- } catch (AphrontQueryConnectionException $ex) {
+ } catch (AphrontConnectionQueryException $ex) {
// If we can't connect to the database, conclude that the isolated
// connection actually is isolated. Philosophically, this perhaps allows
// us to claim this test does not depend on the database?
diff --git a/src/infrastructure/storage/__tests__/AphrontMySQLDatabaseConnectionTestCase.php b/src/infrastructure/storage/__tests__/AphrontMySQLDatabaseConnectionTestCase.php
--- a/src/infrastructure/storage/__tests__/AphrontMySQLDatabaseConnectionTestCase.php
+++ b/src/infrastructure/storage/__tests__/AphrontMySQLDatabaseConnectionTestCase.php
@@ -28,7 +28,7 @@
$caught = null;
try {
queryfx($conn, 'SELECT 1');
- } catch (AphrontQueryConnectionLostException $ex) {
+ } catch (AphrontConnectionLostQueryException $ex) {
$caught = $ex;
}
$this->assertTrue($caught instanceof Exception);
diff --git a/src/infrastructure/storage/lisk/LiskDAO.php b/src/infrastructure/storage/lisk/LiskDAO.php
--- a/src/infrastructure/storage/lisk/LiskDAO.php
+++ b/src/infrastructure/storage/lisk/LiskDAO.php
@@ -460,7 +460,7 @@
$args);
if (count($data) > 1) {
- throw new AphrontQueryCountException(
+ throw new AphrontCountQueryException(
'More than 1 result from loadOneWhere()!');
}
@@ -517,7 +517,7 @@
$this->getID());
if (!$result) {
- throw new AphrontQueryObjectMissingException();
+ throw new AphrontObjectMissingQueryException();
}
return $this;
@@ -771,7 +771,7 @@
}
if (count($relatives) > 1) {
- throw new AphrontQueryCountException(
+ throw new AphrontCountQueryException(
'More than 1 result from loadOneRelative()!');
}
@@ -1183,7 +1183,7 @@
} else {
$data[$key] = qsprintf($conn, '%ns', $value);
}
- } catch (AphrontQueryParameterException $parameter_exception) {
+ } catch (AphrontParameterQueryException $parameter_exception) {
throw new PhutilProxyException(
pht(
"Unable to insert or update object of class %s, field '%s' ".

File Metadata

Mime Type
text/plain
Expires
Fri, May 9, 1:02 AM (9 h, 40 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7551136
Default Alt Text
D10150.id24433.diff (19 KB)

Event Timeline