Adding PDOException as previous exception of DatabaseException

This helps catching FK exceptions and other stuff from PDO, closing the issue #337