From: Roland Häder Date: Wed, 19 Aug 2009 20:28:15 +0000 (+0000) Subject: Error codes changed: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bd59148d536494de639aa555e402365db7c64e6f;p=hub.git 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. --- 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).')');