From: konrad Date: Wed, 16 Jun 2010 06:15:37 +0000 (+0000) Subject: add abort option to debug mode of PG driver X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=90f2f23735637d513db40b4a57e25499e57a9cc4;p=web%2Fkonrad%2Fpack.git 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 --- 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"); } } };