# Handling Errors When Using `PDO_MySQL`
+ `PDO` uses three error handling modes:
  + **`PDO::ERRMODE_SILIENT`**: Default mode. It sets the error information in the **`PDO`** or **`PDOStatement`** object
  + **`PDO::ERRMODE_WARNING`**: Issues an **`E_WARNING`** in addition to set the error information
  + **`PDO::ERRMODE_EXCEPTION`**: Throws a **`PDOException`** in addition to set the error information
+ Set the **`PDO::ATTR_ERRMODE`** attribute of the database handle to change the error handling mode
```
$dbHandle = new PDO($dsName, $user, $password);
$dbHandle->setAttribute(~!@PDO::ATTR_ERRMODE@!~, PDO::ERRMODE_EXCEPTION);
```
-------------------------------------------------------------------------------
[no notes]