@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.

Make the UI when you use an invalid cursor ("?after=19874189471232892") a little nicer

Summary:
Ref T13259. Currently, visiting a page that executes a query with an invalid cursor raises a bare exception that escapes to top level.

Catch this a little sooner and tailor the page a bit.

Test Plan: Visited `/maniphest/?after=335234234223`, saw a nicer exception page.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13259

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

+10 -4
+3 -1
src/__phutil_library_map__.php
··· 3115 3115 'PhabricatorEmojiDatasource' => 'applications/macro/typeahead/PhabricatorEmojiDatasource.php', 3116 3116 'PhabricatorEmojiRemarkupRule' => 'applications/macro/markup/PhabricatorEmojiRemarkupRule.php', 3117 3117 'PhabricatorEmojiTranslation' => 'infrastructure/internationalization/translation/PhabricatorEmojiTranslation.php', 3118 - 'PhabricatorEmptyQueryException' => 'infrastructure/query/PhabricatorEmptyQueryException.php', 3118 + 'PhabricatorEmptyQueryException' => 'infrastructure/query/exception/PhabricatorEmptyQueryException.php', 3119 3119 'PhabricatorEnumConfigType' => 'applications/config/type/PhabricatorEnumConfigType.php', 3120 3120 'PhabricatorEnv' => 'infrastructure/env/PhabricatorEnv.php', 3121 3121 'PhabricatorEnvTestCase' => 'infrastructure/env/__tests__/PhabricatorEnvTestCase.php', ··· 3392 3392 'PhabricatorInternationalizationManagementExtractWorkflow' => 'infrastructure/internationalization/management/PhabricatorInternationalizationManagementExtractWorkflow.php', 3393 3393 'PhabricatorInternationalizationManagementWorkflow' => 'infrastructure/internationalization/management/PhabricatorInternationalizationManagementWorkflow.php', 3394 3394 'PhabricatorInvalidConfigSetupCheck' => 'applications/config/check/PhabricatorInvalidConfigSetupCheck.php', 3395 + 'PhabricatorInvalidQueryCursorException' => 'infrastructure/query/exception/PhabricatorInvalidQueryCursorException.php', 3395 3396 'PhabricatorIteratedMD5PasswordHasher' => 'infrastructure/util/password/PhabricatorIteratedMD5PasswordHasher.php', 3396 3397 'PhabricatorIteratedMD5PasswordHasherTestCase' => 'infrastructure/util/password/__tests__/PhabricatorIteratedMD5PasswordHasherTestCase.php', 3397 3398 'PhabricatorIteratorFileUploadSource' => 'applications/files/uploadsource/PhabricatorIteratorFileUploadSource.php', ··· 9355 9356 'PhabricatorInternationalizationManagementExtractWorkflow' => 'PhabricatorInternationalizationManagementWorkflow', 9356 9357 'PhabricatorInternationalizationManagementWorkflow' => 'PhabricatorManagementWorkflow', 9357 9358 'PhabricatorInvalidConfigSetupCheck' => 'PhabricatorSetupCheck', 9359 + 'PhabricatorInvalidQueryCursorException' => 'Exception', 9358 9360 'PhabricatorIteratedMD5PasswordHasher' => 'PhabricatorPasswordHasher', 9359 9361 'PhabricatorIteratedMD5PasswordHasherTestCase' => 'PhabricatorTestCase', 9360 9362 'PhabricatorIteratorFileUploadSource' => 'PhabricatorFileUploadSource',
+2
src/applications/search/controller/PhabricatorApplicationSearchController.php
··· 351 351 $exec_errors[] = $ex->getMessage(); 352 352 } catch (PhabricatorSearchConstraintException $ex) { 353 353 $exec_errors[] = $ex->getMessage(); 354 + } catch (PhabricatorInvalidQueryCursorException $ex) { 355 + $exec_errors[] = $ex->getMessage(); 354 356 } 355 357 356 358 // The engine may have encountered additional errors during rendering;
src/infrastructure/query/PhabricatorEmptyQueryException.php src/infrastructure/query/exception/PhabricatorEmptyQueryException.php
+4
src/infrastructure/query/exception/PhabricatorInvalidQueryCursorException.php
··· 1 + <?php 2 + 3 + final class PhabricatorInvalidQueryCursorException 4 + extends Exception {}
+1 -3
src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
··· 99 99 } 100 100 101 101 final protected function throwCursorException($message) { 102 - // TODO: Raise a more tailored exception here and make the UI a little 103 - // prettier? 104 - throw new Exception($message); 102 + throw new PhabricatorInvalidQueryCursorException($message); 105 103 } 106 104 107 105 protected function applyExternalCursorConstraintsToQuery(