From 46c908223d5ee150b57c5b0d6c6b7bf54886e813 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 20 May 2017 00:34:01 +0200 Subject: [PATCH] Opps, need to throw NoSocketErrorDetectedException here ... MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- application/hub/classes/class_BaseHubSystem.php | 8 +++----- application/hub/interfaces/class_HubInterface.php | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/application/hub/classes/class_BaseHubSystem.php b/application/hub/classes/class_BaseHubSystem.php index 116513176..5c2f329ed 100644 --- a/application/hub/classes/class_BaseHubSystem.php +++ b/application/hub/classes/class_BaseHubSystem.php @@ -15,9 +15,7 @@ use Hub\Pool\Poolable; use CoreFramework\Listener\Listenable; use CoreFramework\Object\BaseFrameworkSystem; use CoreFramework\Socket\InvalidSocketException; - -// Import SPL stuff -use \BadMethodCallException; +use CoreFramework\Socket\NoSocketErrorDetectedException; /** * A general hub system class @@ -141,7 +139,7 @@ class BaseHubSystem extends BaseFrameworkSystem implements HubInterface { * @param $socketData A valid socket data array (0 = IP/file name, 1 = port) * @return void * @throws InvalidSocketException If the stored socket resource is no socket resource - * @throws BadMethodCallException If socket_last_error() gives zero back + * @throws NoSocketErrorDetectedException If socket_last_error() gives zero back * @todo Move all this socket-related stuff into own class, most of it resides in BaseListener */ public final function handleSocketError ($method, $line, StorableSocket $socketInstance, array $socketData) { @@ -165,7 +163,7 @@ class BaseHubSystem extends BaseFrameworkSystem implements HubInterface { // If the error code is zero, someone called this method without an error if ($errorCode == 0) { // No error detected (or previously cleared outside this method) - throw new BadMethodCallException(array($this, $socketInstance->getSocketResource()), BaseListener::EXCEPTION_NO_SOCKET_ERROR); + throw new NoSocketErrorDetectedException(array($this, $socketInstance->getSocketResource()), BaseListener::EXCEPTION_NO_SOCKET_ERROR); } // END - if // Get handler (method) name diff --git a/application/hub/interfaces/class_HubInterface.php b/application/hub/interfaces/class_HubInterface.php index 34efdca40..ed526ba0c 100644 --- a/application/hub/interfaces/class_HubInterface.php +++ b/application/hub/interfaces/class_HubInterface.php @@ -53,7 +53,7 @@ interface HubInterface extends FrameworkInterface { * @param $socketData A valid socket data array (0 = IP/file name, 1 = port) * @return void * @throws InvalidSocketException If the stored socket resource is no socket resource - * @throws BadMethodCallException If socket_last_error() gives zero back + * @throws NoSocketErrorDetectedException If socket_last_error() gives zero back * @todo Move all this socket-related stuff into own class, most of it resides in BaseListener */ function handleSocketError ($method, $line, StorableSocket $socketInstance, array $socketData); -- 2.39.5