Page MenuHomePhabricator

D9992.id24030.diff
No OneTemporary

D9992.id24030.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -216,6 +216,7 @@
'PhutilLunarPhaseTestCase' => 'utils/__tests__/PhutilLunarPhaseTestCase.php',
'PhutilMarkupEngine' => 'markup/PhutilMarkupEngine.php',
'PhutilMarkupTestCase' => 'markup/__tests__/PhutilMarkupTestCase.php',
+ 'PhutilMethodNotImplementedException' => 'error/PhutilMethodNotImplementedException.php',
'PhutilMetricsChannel' => 'channel/PhutilMetricsChannel.php',
'PhutilMissingSymbolException' => 'symbols/exception/PhutilMissingSymbolException.php',
'PhutilModuleUtilsTestCase' => 'moduleutils/__tests__/PhutilModuleUtilsTestCase.php',
@@ -465,8 +466,8 @@
),
'xmap' => array(
'AASTNodeList' => array(
- 0 => 'Iterator',
- 1 => 'Countable',
+ 'Iterator',
+ 'Countable',
),
'AbstractDirectedGraphTestCase' => 'PhutilTestCase',
'AphrontDatabaseConnection' => 'PhutilQsprintfInterface',
@@ -529,10 +530,10 @@
'PhutilArgumentSpecificationTestCase' => 'PhutilTestCase',
'PhutilArgumentUsageException' => 'PhutilArgumentParserException',
'PhutilArray' => array(
- 0 => 'Phobject',
- 1 => 'Countable',
- 2 => 'ArrayAccess',
- 3 => 'Iterator',
+ 'Phobject',
+ 'Countable',
+ 'ArrayAccess',
+ 'Iterator',
),
'PhutilArrayTestCase' => 'PhutilTestCase',
'PhutilArrayWithDefaultValue' => 'PhutilArray',
@@ -623,6 +624,7 @@
'PhutilLogfileChannel' => 'PhutilChannelChannel',
'PhutilLunarPhaseTestCase' => 'PhutilTestCase',
'PhutilMarkupTestCase' => 'PhutilTestCase',
+ 'PhutilMethodNotImplementedException' => 'Exception',
'PhutilMetricsChannel' => 'PhutilChannelChannel',
'PhutilMissingSymbolException' => 'Exception',
'PhutilModuleUtilsTestCase' => 'PhutilTestCase',
diff --git a/src/error/PhutilMethodNotImplementedException.php b/src/error/PhutilMethodNotImplementedException.php
new file mode 100644
--- /dev/null
+++ b/src/error/PhutilMethodNotImplementedException.php
@@ -0,0 +1,23 @@
+<?php
+
+final class PhutilMethodNotImplementedException extends Exception {
+
+ public function __construct($message = null) {
+ if ($message) {
+ parent::__construct($message);
+ } else {
+ $caller = idx(debug_backtrace(false), 1);
+
+ $class = idx($caller, 'class');
+ $function = idx($caller, 'function');
+
+ if ($class) {
+ parent::__construct(
+ pht('Method %s in class %s is not implemented!', $function, $class));
+ } else {
+ parent::__construct(pht('Function %s is not implemented!', $function));
+ }
+ }
+ }
+
+}
diff --git a/src/markup/engine/remarkup/blockrule/PhutilRemarkupEngineBlockRule.php b/src/markup/engine/remarkup/blockrule/PhutilRemarkupEngineBlockRule.php
--- a/src/markup/engine/remarkup/blockrule/PhutilRemarkupEngineBlockRule.php
+++ b/src/markup/engine/remarkup/blockrule/PhutilRemarkupEngineBlockRule.php
@@ -88,7 +88,7 @@
}
public function extractChildText($text) {
- throw new Exception(pht('Not implemented!'));
+ throw new PhutilMethodNotImplementedException();
}
protected function renderRemarkupTable(array $out_rows) {

File Metadata

Mime Type
text/plain
Expires
Wed, May 15, 12:36 AM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6295837
Default Alt Text
D9992.id24030.diff (3 KB)

Event Timeline