* and print them as exception\r
*\r
**/\r
- public function __construct(\PDOStatement $objPDO, $arrQueryDefinition) {\r
+ public function __construct(\PDOStatement $objPDO, array $arrQueryDefinition) {\r
\r
$strMessage = self::createErrorMessage($objPDO, $arrQueryDefinition);\r
\r
* and query definition\r
*\r
**/\r
- private function createErrorMessage($objPDO, $arrQueryDefinition) {\r
+ private function createErrorMessage(\PDOStatement $objPDO, array $arrQueryDefinition) {\r
\r
$strMessage = self::flattenQueryErrorInfo($objPDO);\r
$strMessage .= self::flattenQueryDefiniton($arrQueryDefinition);\r
* from the driver specific error message\r
*\r
**/\r
- private function flattenQueryErrorInfo($objPDO) {\r
+ private function flattenQueryErrorInfo(\PDOStatement $objPDO) {\r
\r
$arrErrorInfo = $objPDO->errorInfo();\r
\r
* \r
* @return (string) a text version of the query definition\r
* \r
- * create an text, which contains all information \r
- * of the query definition\r
+ * create an text, which contains all *scalar* information \r
+ * of the query definition. if there are non-scalar information\r
+ * added, the will be excluded from output\r
*\r
**/\r
- private function flattenQueryDefiniton($arrQueryDefinition) {\r
+ private function flattenQueryDefiniton(array $arrQueryDefinition) {\r
\r
$strMessage = "\nQuery-Definiton:\n";\r
\r
foreach($arrQueryDefinition AS $strKeyword => $strContent)\r
- $strMessage .= "$strKeyword: $strContent\n";\r
+ if(is_scalar($strContent))\r
+ $strMessage .= "$strKeyword: $strContent\n";\r
\r
return $strMessage . "\n";\r
\r