retry pinging only 5 times
[stapibas.git] / src / stapibas / PDO.php
index a85008bbb5278dbbaee4b825931a180fcad46daa..5dd934ee1e08f237896569e8e146850c5ced709d 100644 (file)
@@ -17,6 +17,16 @@ class PDO extends \PDO
         $this->handleError();
     }
 
+    public function exec($statement)
+    {
+        $res = parent::exec($statement);
+        if ($res !== false) {
+            return $res;
+        }
+
+        $this->handleError();
+    }
+
     protected function handleError()
     {
         echo "SQL error\n";