From 09712029dd69f40de479930b20e6c922b4f34208 Mon Sep 17 00:00:00 2001 From: Bill Fumerola Date: Thu, 4 Jun 2015 10:12:11 -0700 Subject: [PATCH] remove unused WaitHandle->getExceptionIfFailed() Reviewed By: @jano Differential Revision: D2127355 --- hphp/hack/hhi/classes.hhi | 1 - hphp/runtime/ext/asio/ext_wait-handle.cpp | 4 ---- hphp/runtime/ext/asio/ext_wait-handle.h | 1 - hphp/system/idl/asio.idl.json | 13 ------------- hphp/test/slow/async/exceptions.php | 4 +++- 5 files changed, 3 insertions(+), 20 deletions(-) diff --git a/hphp/hack/hhi/classes.hhi b/hphp/hack/hhi/classes.hhi index ad07dbecad7..12190a19f82 100644 --- a/hphp/hack/hhi/classes.hhi +++ b/hphp/hack/hhi/classes.hhi @@ -43,7 +43,6 @@ abstract class WaitHandle<+T> implements Awaitable { public function getID(): int {} public function getName(): string {} public function result() : T {} - public function getExceptionIfFailed(): ?Exception {} public static function setOnIOWaitEnterCallback(?(function(): void) $callback) {} public static function setOnIOWaitExitCallback(?(function(): void) $callback) {} public static function setOnJoinCallback(?(function(WaitableWaitHandle): void) $callback) {} diff --git a/hphp/runtime/ext/asio/ext_wait-handle.cpp b/hphp/runtime/ext/asio/ext_wait-handle.cpp index df7814bd52a..44b13511731 100644 --- a/hphp/runtime/ext/asio/ext_wait-handle.cpp +++ b/hphp/runtime/ext/asio/ext_wait-handle.cpp @@ -108,9 +108,5 @@ String c_WaitHandle::t_getname() { return static_cast(this)->getName(); } -Object c_WaitHandle::t_getexceptioniffailed() { - return isFailed() ? getException() : nullptr; -} - /////////////////////////////////////////////////////////////////////////////// } diff --git a/hphp/runtime/ext/asio/ext_wait-handle.h b/hphp/runtime/ext/asio/ext_wait-handle.h index 989eb15305a..88227ffcda3 100644 --- a/hphp/runtime/ext/asio/ext_wait-handle.h +++ b/hphp/runtime/ext/asio/ext_wait-handle.h @@ -101,7 +101,6 @@ class c_WaitHandle : public ExtObjectDataFlagsgetExceptionIfFailed()->getMessage() == $e->getMessage()); + try { $a->result(); } + catch (Exception $ae) {} + assert($ae->getMessage() == $e->getMessage()); var_dump($e->getMessage()); } -- 2.11.4.GIT