Commit 9678cfa3 authored by Steve Müller's avatar Steve Müller

throw exception if exec() fails in mysqli driver connection

parent d1267280
......@@ -151,7 +151,10 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/
public function exec($statement)
{
$this->_conn->query($statement);
if (false === $this->_conn->query($statement)) {
throw new MysqliException($this->_conn->error, $this->_conn->sqlstate, $this->_conn->errno);
}
return $this->_conn->affected_rows;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment