kla/php-activerecord — pull request #247 by koenpunt (2013-01-22 12:01:18+00:00)
Title: Rethrow PDOException instead of PDOStatement as DatabaseException

The exception currently shows only the following:

```
HY093, ,
```

This PR makes that is shows the original exception, which is way more informative:

```
exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens' in /private/shares/apps/fetch_cms_core/vendor/php-activerecord/lib/Connection.php:309
Stack trace:
#0 /private/shares/apps/fetch_cms_core/vendor/php-activerecord/lib/Connection.php(309): PDOStatement->execute(Array)
#1 /private/shares/apps/fetch_cms_core/vendor/php-activerecord/lib/Table.php(218): ActiveRecord\Connection->query('SELECT * FROM `...', Array)
#2 /private/shares/apps/fetch_cms_core/vendor/php-activerecord/lib/Table.php(209): ActiveRecord\Table->find_by_sql('SELECT * FROM `...', Array, false, NULL)
........
```