Adding handling of PDOException

Adding threatment of PDOException as well to DatabaseException. closes #337