]> git.wh0rd.org - tt-rss.git/blobdiff - classes/db.php
return result codes if DB connection or --debug-feed fails
[tt-rss.git] / classes / db.php
index c7d6da910dd00a6fb93ee7a3caef3b72fe5242e4..e8cb2deab237cf64f0d7b49247046839b557bd7b 100644 (file)
@@ -23,12 +23,16 @@ class Db implements IDb {
                        }
                }
 
-               if (!$this->adapter) die("Error initializing database adapter for " . DB_TYPE);
+               if (!$this->adapter) {
+                       print("Error initializing database adapter for " . DB_TYPE);
+                       exit(100);
+               }
 
                $this->link = $this->adapter->connect(DB_HOST, DB_USER, DB_PASS, DB_NAME, defined('DB_PORT') ? DB_PORT : "");
 
                if (!$this->link) {
-                       die("Error connecting through adapter: " . $this->adapter->last_error());
+                       print("Error connecting through adapter: " . $this->adapter->last_error());
+                       exit(101);
                }
 
                error_reporting($er);