diff --git a/lib/Skeleton/Database/Driver/Mysqli/Statement.php b/lib/Skeleton/Database/Driver/Mysqli/Statement.php index 2950329..7d5bb65 100644 --- a/lib/Skeleton/Database/Driver/Mysqli/Statement.php +++ b/lib/Skeleton/Database/Driver/Mysqli/Statement.php @@ -86,7 +86,11 @@ public function fetch_assoc() { * @access public */ public function execute() { - parent::execute(); + try { + parent::execute(); + } catch (\Exception $e) { + throw new \Skeleton\Database\Exception\Connection($this->sqlstate . ': ' . $this->error); + } if ($this->errno > 0){ throw new \Skeleton\Database\Exception\Query($this->error); }