@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Rename `AphrontQueryException` subclasses

Summary: Ref T5655. Depends on D10149.

Test Plan: Ran `arc unit`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin, hach-que

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D10150

+35 -35
+1 -1
resources/sql/patches/090.forceuniqueprojectnames.php
··· 58 58 $project->getID()); 59 59 unset($update[$key]); 60 60 echo "okay.\n"; 61 - } catch (AphrontQueryDuplicateKeyException $ex) { 61 + } catch (AphrontDuplicateKeyQueryException $ex) { 62 62 echo "failed, will retry.\n"; 63 63 } 64 64 }
+1 -1
resources/sql/patches/20130913.maniphest.1.migratesearch.php
··· 187 187 188 188 try { 189 189 $saved->save(); 190 - } catch (AphrontQueryDuplicateKeyException $ex) { 190 + } catch (AphrontDuplicateKeyQueryException $ex) { 191 191 // Ignore this, we just have duplicate saved queries. 192 192 } 193 193
+2 -2
src/__tests__/PhabricatorInfrastructureTestCase.php
··· 113 113 $caught = null; 114 114 try { 115 115 qsprintf($conn_r, 'SELECT %s', $gclef); 116 - } catch (AphrontQueryCharacterSetException $ex) { 116 + } catch (AphrontCharacterSetQueryException $ex) { 117 117 $caught = $ex; 118 118 } 119 119 120 - $this->assertTrue($caught instanceof AphrontQueryCharacterSetException); 120 + $this->assertTrue($caught instanceof AphrontCharacterSetQueryException); 121 121 } 122 122 123 123 }
+1 -1
src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
··· 250 250 $class = get_class($ex); 251 251 $message = $ex->getMessage(); 252 252 253 - if ($ex instanceof AphrontQuerySchemaException) { 253 + if ($ex instanceof AphrontSchemaQueryException) { 254 254 $message .= 255 255 "\n\n". 256 256 "NOTE: This usually indicates that the MySQL schema has not been ".
+1 -1
src/applications/auth/controller/PhabricatorAuthRegisterController.php
··· 304 304 } 305 305 306 306 return $this->loginUser($user); 307 - } catch (AphrontQueryDuplicateKeyException $exception) { 307 + } catch (AphrontDuplicateKeyQueryException $exception) { 308 308 $same_username = id(new PhabricatorUser())->loadOneWhere( 309 309 'userName = %s', 310 310 $user->getUserName());
+1 -1
src/applications/config/check/PhabricatorSetupCheckDatabase.php
··· 30 30 31 31 try { 32 32 queryfx($conn_raw, 'SELECT 1'); 33 - } catch (AphrontQueryConnectionException $ex) { 33 + } catch (AphrontConnectionQueryException $ex) { 34 34 $message = pht( 35 35 "Unable to connect to MySQL!\n\n". 36 36 "%s\n\n".
+1 -1
src/applications/differential/storage/DifferentialDraft.php
··· 16 16 ->setAuthorPHID($author_phid) 17 17 ->setDraftKey($draft_key) 18 18 ->save(); 19 - } catch (AphrontQueryDuplicateKeyException $ex) { 19 + } catch (AphrontDuplicateKeyQueryException $ex) { 20 20 // no worries 21 21 } 22 22 }
+1 -1
src/applications/herald/controller/HeraldRuleController.php
··· 333 333 $rule->logEdit($request->getUser()->getPHID(), $edit_action); 334 334 $rule->saveTransaction(); 335 335 336 - } catch (AphrontQueryDuplicateKeyException $ex) { 336 + } catch (AphrontDuplicateKeyQueryException $ex) { 337 337 $e_name = pht('Not Unique'); 338 338 $errors[] = pht('Rule name is not unique. Choose a unique name.'); 339 339 }
+1 -1
src/applications/macro/controller/PhabricatorMacroEditController.php
··· 125 125 126 126 $view_uri = $this->getApplicationURI('/view/'.$original->getID().'/'); 127 127 return id(new AphrontRedirectResponse())->setURI($view_uri); 128 - } catch (AphrontQueryDuplicateKeyException $ex) { 128 + } catch (AphrontDuplicateKeyQueryException $ex) { 129 129 throw $ex; 130 130 $errors[] = pht('Macro name is not unique!'); 131 131 $e_name = pht('Duplicate');
+1 -1
src/applications/mailinglists/controller/PhabricatorMailingListsEditController.php
··· 67 67 $list->save(); 68 68 return id(new AphrontRedirectResponse()) 69 69 ->setURI($this->getApplicationURI()); 70 - } catch (AphrontQueryDuplicateKeyException $ex) { 70 + } catch (AphrontDuplicateKeyQueryException $ex) { 71 71 $e_email = pht('Duplicate'); 72 72 $errors[] = pht('Another mailing list already uses that address.'); 73 73 }
+1 -1
src/applications/owners/controller/PhabricatorOwnersEditController.php
··· 92 92 $package->save(); 93 93 return id(new AphrontRedirectResponse()) 94 94 ->setURI('/owners/package/'.$package->getID().'/'); 95 - } catch (AphrontQueryDuplicateKeyException $ex) { 95 + } catch (AphrontDuplicateKeyQueryException $ex) { 96 96 $e_name = pht('Duplicate'); 97 97 $errors[] = pht('Package name must be unique.'); 98 98 }
+1 -1
src/applications/people/controller/PhabricatorPeopleNewController.php
··· 104 104 $response = id(new AphrontRedirectResponse()) 105 105 ->setURI('/p/'.$user->getUsername().'/'); 106 106 return $response; 107 - } catch (AphrontQueryDuplicateKeyException $ex) { 107 + } catch (AphrontDuplicateKeyQueryException $ex) { 108 108 $errors[] = pht('Username and email must be unique.'); 109 109 110 110 $same_username = id(new PhabricatorUser())
+1 -1
src/applications/people/controller/PhabricatorPeopleRenameController.php
··· 56 56 $new_uri = '/p/'.$v_username.'/'; 57 57 58 58 return id(new AphrontRedirectResponse())->setURI($new_uri); 59 - } catch (AphrontQueryDuplicateKeyException $ex) { 59 + } catch (AphrontDuplicateKeyQueryException $ex) { 60 60 $e_username = pht('Not Unique'); 61 61 $errors[] = pht('Another user already has that username.'); 62 62 }
+3 -3
src/applications/people/editor/PhabricatorUserEditor.php
··· 54 54 $user->save(); 55 55 $email->setUserPHID($user->getPHID()); 56 56 $email->save(); 57 - } catch (AphrontQueryDuplicateKeyException $ex) { 57 + } catch (AphrontDuplicateKeyQueryException $ex) { 58 58 // We might have written the user but failed to write the email; if 59 59 // so, erase the IDs we attached. 60 60 $user->setID(null); ··· 155 155 156 156 try { 157 157 $user->save(); 158 - } catch (AphrontQueryDuplicateKeyException $ex) { 158 + } catch (AphrontDuplicateKeyQueryException $ex) { 159 159 $user->setUsername($old_username); 160 160 $user->killTransaction(); 161 161 throw $ex; ··· 365 365 366 366 try { 367 367 $email->save(); 368 - } catch (AphrontQueryDuplicateKeyException $ex) { 368 + } catch (AphrontDuplicateKeyQueryException $ex) { 369 369 $user->endWriteLocking(); 370 370 $user->killTransaction(); 371 371
+1 -1
src/applications/people/lipsum/PhabricatorPeopleTestDataGenerator.php
··· 25 25 ->createNewUser($user, $email_object); 26 26 27 27 return $user; 28 - } catch (AphrontQueryDuplicateKeyException $ex) { 28 + } catch (AphrontDuplicateKeyQueryException $ex) { 29 29 } 30 30 } 31 31 }
+1 -1
src/applications/phame/controller/blog/PhameBlogEditController.php
··· 96 96 $blog->save(); 97 97 return id(new AphrontRedirectResponse()) 98 98 ->setURI($this->getApplicationURI('blog/view/'.$blog->getID().'/')); 99 - } catch (AphrontQueryDuplicateKeyException $ex) { 99 + } catch (AphrontDuplicateKeyQueryException $ex) { 100 100 $errors[] = pht('Domain must be unique.'); 101 101 $e_custom_domain = pht('Not Unique'); 102 102 }
+1 -1
src/applications/phame/controller/post/PhamePostEditController.php
··· 82 82 83 83 $uri = $this->getApplicationURI('/post/view/'.$post->getID().'/'); 84 84 return id(new AphrontRedirectResponse())->setURI($uri); 85 - } catch (AphrontQueryDuplicateKeyException $e) { 85 + } catch (AphrontDuplicateKeyQueryException $e) { 86 86 $e_phame_title = pht('Not Unique'); 87 87 $errors[] = pht('Another post already uses this slug. '. 88 88 'Each post must have a unique slug.');
+1 -1
src/applications/phlux/controller/PhluxEditController.php
··· 92 92 $editor->applyTransactions($var, $xactions); 93 93 $view_uri = $this->getApplicationURI('/view/'.$key.'/'); 94 94 return id(new AphrontRedirectResponse())->setURI($view_uri); 95 - } catch (AphrontQueryDuplicateKeyException $ex) { 95 + } catch (AphrontDuplicateKeyQueryException $ex) { 96 96 $e_key = pht('Not Unique'); 97 97 $errors[] = pht('Variable key must be unique.'); 98 98 }
+1 -1
src/applications/phragment/controller/PhragmentSnapshotCreateController.php
··· 52 52 ->setPrimaryFragmentPHID($fragment->getPHID()) 53 53 ->setName($v_name) 54 54 ->save(); 55 - } catch (AphrontQueryDuplicateKeyException $e) { 55 + } catch (AphrontDuplicateKeyQueryException $e) { 56 56 $errors[] = pht('A snapshot with this name already exists.'); 57 57 } 58 58
+1 -1
src/applications/releeph/controller/product/ReleephProductCreateController.php
··· 44 44 45 45 return id(new AphrontRedirectResponse()) 46 46 ->setURI($releeph_product->getURI()); 47 - } catch (AphrontQueryDuplicateKeyException $ex) { 47 + } catch (AphrontDuplicateKeyQueryException $ex) { 48 48 $e_name = pht('Not Unique'); 49 49 $errors[] = pht('Another product already uses this name.'); 50 50 }
+1 -1
src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php
··· 134 134 135 135 try { 136 136 $repository->save(); 137 - } catch (AphrontQueryDuplicateKeyException $ex) { 137 + } catch (AphrontDuplicateKeyQueryException $ex) { 138 138 throw new ConduitException('ERR-DUPLICATE'); 139 139 } 140 140
+1 -1
src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
··· 632 632 633 633 634 634 635 - } catch (AphrontQueryDuplicateKeyException $ex) { 635 + } catch (AphrontDuplicateKeyQueryException $ex) { 636 636 $commit->killTransaction(); 637 637 // Ignore. This can happen because we discover the same new commit 638 638 // more than once when looking at history, or because of races or
+1 -1
src/applications/search/controller/PhabricatorSearchController.php
··· 59 59 $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); 60 60 try { 61 61 $saved->setID(null)->save(); 62 - } catch (AphrontQueryDuplicateKeyException $ex) { 62 + } catch (AphrontDuplicateKeyQueryException $ex) { 63 63 // Ignore, this is just a repeated search. 64 64 } 65 65 unset($unguarded);
+1 -1
src/applications/search/engine/PhabricatorApplicationSearchEngine.php
··· 52 52 $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); 53 53 try { 54 54 $query->save(); 55 - } catch (AphrontQueryDuplicateKeyException $ex) { 55 + } catch (AphrontDuplicateKeyQueryException $ex) { 56 56 // Ignore, this is just a repeated search. 57 57 } 58 58 unset($unguarded);
+1 -1
src/applications/settings/panel/PhabricatorSettingsPanelEmailAddresses.php
··· 210 210 ->addSubmitButton(pht('Done')); 211 211 212 212 return id(new AphrontDialogResponse())->setDialog($dialog); 213 - } catch (AphrontQueryDuplicateKeyException $ex) { 213 + } catch (AphrontDuplicateKeyQueryException $ex) { 214 214 $email = pht('Duplicate'); 215 215 $errors[] = pht('Another user already has this email.'); 216 216 }
+1 -1
src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php
··· 103 103 $key->save(); 104 104 return id(new AphrontRedirectResponse()) 105 105 ->setURI($this->getPanelURI()); 106 - } catch (AphrontQueryDuplicateKeyException $ex) { 106 + } catch (AphrontDuplicateKeyQueryException $ex) { 107 107 $e_key = pht('Duplicate'); 108 108 $errors[] = pht('This public key is already associated with a user '. 109 109 'account.');
+1 -1
src/infrastructure/storage/__tests__/AphrontIsolatedDatabaseConnectionTestCase.php
··· 134 134 null, 135 135 $row, 136 136 'Expect fake row to exist only in isolation.'); 137 - } catch (AphrontQueryConnectionException $ex) { 137 + } catch (AphrontConnectionQueryException $ex) { 138 138 // If we can't connect to the database, conclude that the isolated 139 139 // connection actually is isolated. Philosophically, this perhaps allows 140 140 // us to claim this test does not depend on the database?
+1 -1
src/infrastructure/storage/__tests__/AphrontMySQLDatabaseConnectionTestCase.php
··· 28 28 $caught = null; 29 29 try { 30 30 queryfx($conn, 'SELECT 1'); 31 - } catch (AphrontQueryConnectionLostException $ex) { 31 + } catch (AphrontConnectionLostQueryException $ex) { 32 32 $caught = $ex; 33 33 } 34 34 $this->assertTrue($caught instanceof Exception);
+4 -4
src/infrastructure/storage/lisk/LiskDAO.php
··· 460 460 $args); 461 461 462 462 if (count($data) > 1) { 463 - throw new AphrontQueryCountException( 463 + throw new AphrontCountQueryException( 464 464 'More than 1 result from loadOneWhere()!'); 465 465 } 466 466 ··· 517 517 $this->getID()); 518 518 519 519 if (!$result) { 520 - throw new AphrontQueryObjectMissingException(); 520 + throw new AphrontObjectMissingQueryException(); 521 521 } 522 522 523 523 return $this; ··· 771 771 } 772 772 773 773 if (count($relatives) > 1) { 774 - throw new AphrontQueryCountException( 774 + throw new AphrontCountQueryException( 775 775 'More than 1 result from loadOneRelative()!'); 776 776 } 777 777 ··· 1183 1183 } else { 1184 1184 $data[$key] = qsprintf($conn, '%ns', $value); 1185 1185 } 1186 - } catch (AphrontQueryParameterException $parameter_exception) { 1186 + } catch (AphrontParameterQueryException $parameter_exception) { 1187 1187 throw new PhutilProxyException( 1188 1188 pht( 1189 1189 "Unable to insert or update object of class %s, field '%s' ".