]> git.mxchange.org Git - hub.git/commitdiff
Some comments improved, minor changes
authorRoland Häder <roland@mxchange.org>
Sun, 12 Feb 2012 11:44:06 +0000 (11:44 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 12 Feb 2012 11:44:06 +0000 (11:44 +0000)
application/hub/exceptions/package/class_UnsupportedPackageCodeHandlerException.php
application/hub/main/package/assembler/class_PackageAssembler.php

index 6e288b4e2ee6eb7cf9cb9e45d563cfee6e5fb31e..388755050937caea2e25de66a0ea905c6c3a7264 100644 (file)
@@ -34,8 +34,8 @@ class UnsupportedPackageCodeHandlerException extends FrameworkException {
                $message = sprintf("[%s:%d] Unsupported package code handler %s for package code %s detected.",
                        $messageArray[0]->__toString(),
                        $this->getLine(),
-                       $messageArray[2],
-                       $messageArray[1][BaseRawDataHandler::PACKAGE_ERROR_CODE]
+                       $messageArray[1],
+                       $messageArray[2][BaseRawDataHandler::PACKAGE_ERROR_CODE]
                );
 
                // Call parent exception constructor
index 9e952487b41fe2a604610781294130a023dc1eb5..04195d0c56c6ec2142efd76020e0fff63bb8b917 100644 (file)
@@ -36,7 +36,7 @@ class PackageAssembler extends BaseFrameworkSystem implements Assembler, Registe
        /**
         * Creates an instance of this class
         *
-        * @return      $assemblerInstance              An instance of a Fragmentable class
+        * @return      $assemblerInstance      An instance of an Assembler class
         */
        public static final function createPackageAssembler () {
                // Get new instance
@@ -73,7 +73,7 @@ class PackageAssembler extends BaseFrameworkSystem implements Assembler, Registe
                // Abort if the call-back method is not there
                if (!method_exists($this, $methodName)) {
                        // Throw an exception
-                       throw new UnsupportedPackageCodeHandlerException(array($this, $packageContent, $methodName), BaseListener::EXCEPTION_UNSUPPORTED_PACKAGE_CODE_HANDLER);
+                       throw new UnsupportedPackageCodeHandlerException(array($this, $methodName, $packageContent), BaseListener::EXCEPTION_UNSUPPORTED_PACKAGE_CODE_HANDLER);
                } // END - if
 
                // Call it back
@@ -81,7 +81,10 @@ class PackageAssembler extends BaseFrameworkSystem implements Assembler, Registe
        }
 
        /**
-        * Call-back handler to handle unhandled packages
+        * Call-back handler to handle unhandled packages. This method "explodes"
+        * the string with the chunk separator from PackageFragmenter class, does
+        * some low checks on it and feeds it into another queue for verification
+        * and re-request for bad chunks.
         *
         * @param       $packageContent         An array with two elements: 'decoded_data' and 'error_code'
         * @return      void