]> git.nbdom.net Git - nb.git/commitdiff
dont catch error when connect to db
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 12 Jan 2016 22:47:32 +0000 (23:47 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 12 Jan 2016 22:47:32 +0000 (23:47 +0100)
lib/php/db.php

index 7019970190249c466042fd77f17f4061501646d5..1018b72ebbbad3be8454c4c108143942083c75bc 100644 (file)
@@ -62,17 +62,17 @@ class db extends nb {
     $this->type = strtolower(preg_replace('/^([^:]+):.*$/','\1',$this->pdo));
     #preg_match_all('/[:;](user|username|password)=([^;]*)/',$this->pdo,$m); bye($m);
 
-    try {
+# NB 12.01.16     try {
 
       $this->conn = new PDO($this->pdo,$this->username,$this->password,$this->options);
       if (isset($this->pdo_error)) $this->conn->setAttribute(PDO::ATTR_ERRMODE, $this->pdo_error);
 
-    } catch (PDOException $e) {
-
-      err($e->getMessage(), "Db.new()");
-      return false;
-
-    }
+# NB 12.01.16     } catch (PDOException $e) {
+# NB 12.01.16 
+# NB 12.01.16       err($e->getMessage(), "Db.new()");
+# NB 12.01.16       return false;
+# NB 12.01.16 
+# NB 12.01.16     }
 
     #if (empty($this->name)) $this->name = preg_replace('/^(?:(?:sqlite:.*(.*?)(\.\w+)?)|(?:.*?dbname=([^;]+).*?))$/','\1',$this->pdo);
 # NB 22.12.15     if (empty($this->name) and preg_match('/(?:sqlite:|dbname=)([^;\.]+)/',$this->pdo,$m)) {