Global php PDO handling errors
<p>I use try/catch block in my classes methods, If a get an exception, I log the error. But I would like to tell the "User" that a database query/etc failed - and the problem should be fixed soon.
I could use a die() on the Exception in my methods, but that wouldn't be DRY, as I would have to retype it a lot, so any suggestions on how I can do this.</p>

<p>Example method:</p>

<pre><code>public function login($username, $password) {
    try {
        $this-&gt;STH = $this-&gt;DBH-&gt;prepare("SELECT id, baned, activated FROM users WHERE username = ? AND password = ?");
        $this-&gt;STH-&gt;setFetchMode(PDO::FETCH_OBJ); 
        $this-&gt;STH-&gt;execute(array($username, $password));

        if (($row = $this-&gt;STH-&gt;fetch()) !== false)
            return $row;
    } catch (PDOException $e) {
        //Log $e-&gt;getMessage();
        die('A database error occoured, we are working on the problem, and it should work in a few...');
    }
}   
</code></pre>
