From: Roland Häder Date: Sat, 29 Jun 2013 00:54:00 +0000 (+0000) Subject: Debug message was added at wrong position X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5002cad59806c0bde923fcbff5f4cedf76988bc4;p=hub.git Debug message was added at wrong position --- diff --git a/application/hub/exceptions.php b/application/hub/exceptions.php index dbce802e7..ed80b25d5 100644 --- a/application/hub/exceptions.php +++ b/application/hub/exceptions.php @@ -87,14 +87,14 @@ Backtrace: // Invalid exception instance detected! Do *only* throw exceptions that // extends our own exception 'FrameworkException' to get such nice // outputs like above. - print("exceptionInstance is invalid! Please inform the core developer team.\n"); + print('exceptionInstance[]=' . gettype($exceptionInstance) . ' is invalid! Please inform the core developer team.'); } } // Error handler function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) { // Construct the message - $message = sprintf("File: %s, Line: %s, Code: %s, Message: %s", + $message = sprintf('File: %s, Line: %s, Code: %s, Message: %s', basename($errfile), $errline, $errno, @@ -113,7 +113,7 @@ function __assertHandler ($file, $line, $code) { } // END - if // Create message - $message = sprintf("File: %s, Line: %s, Code: %s", + $message = sprintf('File: %s, Line: %s, Code: %s', basename($file), $line, $code diff --git a/application/hub/main/handler/message-types/requests/class_NodeMessageRequestNodeListHandler.php b/application/hub/main/handler/message-types/requests/class_NodeMessageRequestNodeListHandler.php index fe39ae849..2eb3c37ef 100644 --- a/application/hub/main/handler/message-types/requests/class_NodeMessageRequestNodeListHandler.php +++ b/application/hub/main/handler/message-types/requests/class_NodeMessageRequestNodeListHandler.php @@ -130,9 +130,6 @@ class NodeMessageRequestNodeListHandler extends BaseMessageHandler implements Ha $this->getConfigInstance()->setConfigEntry($targetKey, $this->getConfigInstance()->getConfigEntry($sourceKey)); } // END - foreach - // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('REQUEST-HANDLER[' . __LINE__ . ']: Got a node list of ' . count($nodeList) . ' entry/-ies back.'); - // Query local DHT for nodes except given session id $nodeList = $this->getDhtInstance()->queryLocalNodeListExceptByMessageData( $messageData, @@ -142,6 +139,9 @@ class NodeMessageRequestNodeListHandler extends BaseMessageHandler implements Ha BaseHubNode::OBJECT_LIST_SEPARATOR ); + // Debug message + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('REQUEST-HANDLER[' . __LINE__ . ']: Got a node list of ' . count($nodeList) . ' entry/-ies back.'); + // Set it serialized in configuration (temporarily) $this->getConfigInstance()->setConfigEntry('node_list', base64_encode(serialize($nodeList)));