Exception handling improvements on pdo