[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6853] Added line that makes it possible to get excep
From: |
Petur Thorsteinsson |
Subject: |
[Fmsystem-commits] [6853] Added line that makes it possible to get exception from the db object |
Date: |
Thu, 27 Jan 2011 08:16:18 +0000 |
Revision: 6853
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6853
Author: peturbjorn
Date: 2011-01-27 08:16:17 +0000 (Thu, 27 Jan 2011)
Log Message:
-----------
Added line that makes it possible to get exception from the db object
Modified Paths:
--------------
branches/dev-bim2/phpgwapi/inc/class.db.inc.php
branches/dev-bim2/phpgwapi/inc/class.db_pdo.inc.php
Modified: branches/dev-bim2/phpgwapi/inc/class.db.inc.php
===================================================================
--- branches/dev-bim2/phpgwapi/inc/class.db.inc.php 2011-01-26 16:13:25 UTC
(rev 6852)
+++ branches/dev-bim2/phpgwapi/inc/class.db.inc.php 2011-01-27 08:16:17 UTC
(rev 6853)
@@ -92,7 +92,11 @@
* @var string $Halt_On_Error should connection and script be
terminated on error?
*/
var $Halt_On_Error = 'yes'; // should be true or false
-
+
+ /*
+ * @var boolean $Exception_On_Error should SQL throw exception
on error ?
+ */
+ var $Exception_On_Error = false;
/**
* @var bool $auto_stripslashes automagically remove slashes
from field values returned?
*/
Modified: branches/dev-bim2/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- branches/dev-bim2/phpgwapi/inc/class.db_pdo.inc.php 2011-01-26 16:13:25 UTC
(rev 6852)
+++ branches/dev-bim2/phpgwapi/inc/class.db_pdo.inc.php 2011-01-27 08:16:17 UTC
(rev 6853)
@@ -308,7 +308,7 @@
*/
public function query($sql, $line = '', $file = '', $exec =
false, $fetch_single = false)
{
-
+
$this->_get_fetchmode();
$this->fetch_single = $fetch_single;
@@ -370,6 +370,8 @@
}
$this->transaction_abort();
exit;
+ } else if($this->Exception_On_Error) {
+ throw $e;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6853] Added line that makes it possible to get exception from the db object,
Petur Thorsteinsson <=