Exception.php for string-based database errors

MySQL reports errors with codes of the form HY0000, but PHP only allows integer values for $code when constructing Exceptions.