Page MenuHomePhabricator

D14401.id.diff
No OneTemporary

D14401.id.diff

diff --git a/src/applications/phurl/editor/PhabricatorPhurlURLEditor.php b/src/applications/phurl/editor/PhabricatorPhurlURLEditor.php
--- a/src/applications/phurl/editor/PhabricatorPhurlURLEditor.php
+++ b/src/applications/phurl/editor/PhabricatorPhurlURLEditor.php
@@ -248,5 +248,19 @@
return $body;
}
+ protected function didCatchDuplicateKeyException(
+ PhabricatorLiskDAO $object,
+ array $xactions,
+ Exception $ex) {
+
+ $errors = array();
+ $errors[] = new PhabricatorApplicationTransactionValidationError(
+ PhabricatorPhurlURLTransaction::TYPE_ALIAS,
+ pht('Duplicate'),
+ pht('This alias is already in use.'),
+ null);
+
+ throw new PhabricatorApplicationTransactionValidationException($errors);
+ }
}

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 5, 6:37 AM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7222792
Default Alt Text
D14401.id.diff (767 B)

Event Timeline