]> git.mxchange.org Git - hub.git/commitdiff
Error codes changed:
authorRoland Häder <roland@mxchange.org>
Wed, 19 Aug 2009 20:28:15 +0000 (20:28 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 19 Aug 2009 20:28:15 +0000 (20:28 +0000)
- 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.

application/hub/main/handler/network/class_BaseNetworkPackageHandler.php
application/hub/main/resolver/state/network/class_NetworkStateResolver.php

index 8d13405f66d463c49b05d73a8259fb40cc69dc31..816b836398ac6f958d33dbd521a8455531b88264 100644 (file)
@@ -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';
index 11c129e0c99d0e174c995dd185b7293f8e5936ed..ddba4be42c0d61c4bfed94794b2b3fdee547f933 100644 (file)
@@ -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).')');