Fixes bug #31327 : Debug plugin (git master version only) doesn't catch SQL errors

As described here:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=31327

SQL SELECT queries with errors in them added an ugly fatal error at bottom of page with debug plugin enabled (git version only).

This pull request fixes it (and fixes a phpdoc inconsistency flagged by my IDE)