From: Roland Häder Date: Sun, 12 Feb 2012 11:44:06 +0000 (+0000) Subject: Some comments improved, minor changes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=816e9f9283253442f6416325d500c3ae24a410e0;p=hub.git Some comments improved, minor changes --- diff --git a/application/hub/exceptions/package/class_UnsupportedPackageCodeHandlerException.php b/application/hub/exceptions/package/class_UnsupportedPackageCodeHandlerException.php index 6e288b4e2..388755050 100644 --- a/application/hub/exceptions/package/class_UnsupportedPackageCodeHandlerException.php +++ b/application/hub/exceptions/package/class_UnsupportedPackageCodeHandlerException.php @@ -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 diff --git a/application/hub/main/package/assembler/class_PackageAssembler.php b/application/hub/main/package/assembler/class_PackageAssembler.php index 9e952487b..04195d0c5 100644 --- a/application/hub/main/package/assembler/class_PackageAssembler.php +++ b/application/hub/main/package/assembler/class_PackageAssembler.php @@ -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