ralphschindler/zf2 — comment on commit 9809c7f56f03ebc7e83d27834e792c1c94e09ec7
File: library/Zend/Db/Adapter/Driver/Mysqli/Statement.php line 44
By ralphschindler:

ErrorException is a way of wrapping mysqli errors into an exception object, so we can practice exception chaining. For things like PDO, we'll just throw the InvalidQueryException with the PDOException as the $previous exception. More work on this after beta3.