From 90f2f23735637d513db40b4a57e25499e57a9cc4 Mon Sep 17 00:00:00 2001 From: konrad Date: Wed, 16 Jun 2010 06:15:37 +0000 Subject: [PATCH] add abort option to debug mode of PG driver git-svn-id: https://silmor.de/svn/softmagic/pack/trunk@503 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- phpbase/db_pgsql.php | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/phpbase/db_pgsql.php b/phpbase/db_pgsql.php index def1723..7c0e636 100644 --- a/phpbase/db_pgsql.php +++ b/phpbase/db_pgsql.php @@ -348,9 +348,10 @@ class PGsqlEngine extends DbEngine } /**development helper: activate debug mode*/ - public function setDebugMode($b=true) + public function setDebugMode($b=true,$a=false) { $this->do_debug=$b; + $this->do_abort=$b && $a; } /**internal helper: print debug message as XML comment, if activated*/ @@ -360,7 +361,8 @@ class PGsqlEngine extends DbEngine print("\n"); if($detail!==false) print("\n"); -// die("giving up"); + if($this->do_abort) + die("giving up"); } } }; -- 1.7.2.5