Update example with PDO error handling

Update the example in the Better persistent part to raise the error on SQL error.