diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 232fa14c05..e96887bd12 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1964,7 +1964,6 @@ phutil_register_library_map(array( 'ReleephFieldParseException' => 'applications/releeph/field/exception/ReleephFieldParseException.php', 'ReleephFieldSelector' => 'applications/releeph/field/selector/ReleephFieldSelector.php', 'ReleephFieldSpecification' => 'applications/releeph/field/specification/ReleephFieldSpecification.php', - 'ReleephFieldSpecificationIncompleteException' => 'applications/releeph/field/exception/ReleephFieldSpecificationIncompleteException.php', 'ReleephIntentFieldSpecification' => 'applications/releeph/field/specification/ReleephIntentFieldSpecification.php', 'ReleephLevelFieldSpecification' => 'applications/releeph/field/specification/ReleephLevelFieldSpecification.php', 'ReleephOriginalCommitFieldSpecification' => 'applications/releeph/field/specification/ReleephOriginalCommitFieldSpecification.php', @@ -4149,7 +4148,6 @@ phutil_register_library_map(array( 0 => 'PhabricatorCustomField', 1 => 'PhabricatorMarkupInterface', ), - 'ReleephFieldSpecificationIncompleteException' => 'Exception', 'ReleephIntentFieldSpecification' => 'ReleephFieldSpecification', 'ReleephLevelFieldSpecification' => 'ReleephFieldSpecification', 'ReleephOriginalCommitFieldSpecification' => 'ReleephFieldSpecification', diff --git a/src/applications/releeph/field/exception/ReleephFieldSpecificationIncompleteException.php b/src/applications/releeph/field/exception/ReleephFieldSpecificationIncompleteException.php deleted file mode 100644 index 6e67dcf350..0000000000 --- a/src/applications/releeph/field/exception/ReleephFieldSpecificationIncompleteException.php +++ /dev/null @@ -1,11 +0,0 @@ -getStorageKey(); if ($key === null) { - throw new ReleephFieldSpecificationIncompleteException($this); + throw new PhabricatorCustomFieldImplementationIncompleteException($this); } if (strpos($key, '.') !== false) { /** @@ -176,11 +176,11 @@ abstract class ReleephFieldSpecification } public function renderLabelForCommitMessage() { - throw new ReleephFieldSpecificationIncompleteException($this); + throw new PhabricatorCustomFieldImplementationIncompleteException($this); } public function renderValueForCommitMessage() { - throw new ReleephFieldSpecificationIncompleteException($this); + throw new PhabricatorCustomFieldImplementationIncompleteException($this); } public function shouldAppearOnRevertMessage() { @@ -215,7 +215,7 @@ abstract class ReleephFieldSpecification } public function getMarkupText($field) { - throw new ReleephFieldSpecificationIncompleteException($this); + throw new PhabricatorCustomFieldImplementationIncompleteException($this); } final public function getMarkupEngineOutput() { diff --git a/src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php b/src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php index 4017da7ded..e67a01877d 100644 --- a/src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php @@ -20,10 +20,7 @@ abstract class ReleephLevelFieldSpecification abstract public function getDescriptionForLevel($level); public function getStorageKey() { - $class = get_class($this); - throw new ReleephFieldSpecificationIncompleteException( - $this, - "You must implement getStorageKey() for children of {$class}!"); + throw new PhabricatorCustomFieldImplementationIncompleteException($this); } public function renderValueForHeaderView() { @@ -34,11 +31,7 @@ abstract class ReleephLevelFieldSpecification $control_name = $this->getRequiredStorageKey(); $all_levels = $this->getLevels(); - $level = $request->getStr($control_name); - if (!$level) { - $level = $this->getValue(); - } - + $level = $this->getValue(); if (!$level) { $level = $this->getDefaultLevel(); }