From bb298713b8029354be8a93a20e086df176d1b47c Mon Sep 17 00:00:00 2001 From: Cyril Vazquez <cyril.vazquez@maarch.org> Date: Mon, 2 Jul 2012 11:27:22 +0000 Subject: [PATCH] --- .../core/tests/class/DataAccessService_Database.php | 11 ++++++++++- core/trunk/core/tests/class/MessageController.php | 1 - 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/core/trunk/core/tests/class/DataAccessService_Database.php b/core/trunk/core/tests/class/DataAccessService_Database.php index 47f707db462..6e753125a84 100644 --- a/core/trunk/core/tests/class/DataAccessService_Database.php +++ b/core/trunk/core/tests/class/DataAccessService_Database.php @@ -389,12 +389,21 @@ class DataAccessService_Database private function throwQueryException($query) { + require_once 'core/tests/class/MessageController.php'; + require_once 'core/tests/class/Message.php'; + require_once 'core/tests/class/Exception.php'; $messageController = new MessageController(); $messageController->loadMessageFile('core/xml/DataAccessService_Messages.xml'); + $sqlError = $this->pdo->errorInfo(); $message = $messageController->createMessage( __CLASS__ . '::queryError', false, - array($query) + array( + $sqlError[0], + $sqlError[1], + $sqlError[2], + $query + ) ); throw new maarch\Exception($message); } diff --git a/core/trunk/core/tests/class/MessageController.php b/core/trunk/core/tests/class/MessageController.php index a1757186fb4..94c342ef95d 100644 --- a/core/trunk/core/tests/class/MessageController.php +++ b/core/trunk/core/tests/class/MessageController.php @@ -129,7 +129,6 @@ class MessageController $params ); - // Create message object $message = new Message( $id, -- GitLab