From bd59148d536494de639aa555e402365db7c64e6f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 19 Aug 2009 20:28:15 +0000 Subject: [PATCH] Error codes changed: - Error code 107 is also 'transport endpoint not connected'. But why does it raise? - general_error is now known as unknown_error because our state resolver doesn't know how to handle it. --- .../handler/network/class_BaseNetworkPackageHandler.php | 2 +- .../resolver/state/network/class_NetworkStateResolver.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/application/hub/main/handler/network/class_BaseNetworkPackageHandler.php b/application/hub/main/handler/network/class_BaseNetworkPackageHandler.php index 8d13405f6..816b83639 100644 --- a/application/hub/main/handler/network/class_BaseNetworkPackageHandler.php +++ b/application/hub/main/handler/network/class_BaseNetworkPackageHandler.php @@ -23,7 +23,7 @@ */ class BaseNetworkPackageHandler extends BaseHandler { // Error codes - const SOCKET_ERROR_GENERAL = 'general_error'; + const SOCKET_ERROR_UNKNOWN = 'unknown_error'; const SOCKET_ERROR_TRANSPORT_ENDPOINT = 'transport_endpoint'; const SOCKET_ERROR_UNHANDLED = 'unhandled_package'; const SOCKET_ERROR_EMPTY_DATA = 'empty_data'; diff --git a/application/hub/main/resolver/state/network/class_NetworkStateResolver.php b/application/hub/main/resolver/state/network/class_NetworkStateResolver.php index 11c129e0c..ddba4be42 100644 --- a/application/hub/main/resolver/state/network/class_NetworkStateResolver.php +++ b/application/hub/main/resolver/state/network/class_NetworkStateResolver.php @@ -73,15 +73,16 @@ class NetworkStateResolver extends BaseStateResolver implements StateResolver { $errorCode = $packageInstance->getErrorCode(); // Is the code a number, then we have to change it - if ($errorCode == 134) { + if (($errorCode == 134) || ($errorCode == 107)) { // Transport endpoint not connected, should be handled else! + // @TODO On some systems it is 134, on some 107? $errorCode = BaseNetworkPackageHandler::SOCKET_ERROR_TRANSPORT_ENDPOINT; } elseif (is_int($errorCode)) { // Debug output (because we might want to handle it like the above(s) - $this->debugOutput(__METHOD__ . ': errorCode=' . $errorCode); + $this->debugOutput(__METHOD__ . ': UNKNOWN ERROR CODE = ' . $errorCode); // Change it only in this class - $errorCode = BaseNetworkPackageHandler::SOCKET_ERROR_GENERAL; + $errorCode = BaseNetworkPackageHandler::SOCKET_ERROR_UNKNOWN; } // END - if $this->partialStub('errorCode='.$errorCode.',rawData[] = '.gettype($rawData).'('.strlen($rawData).')'); -- 2.39.5