Proper way to error handle
<p>This is more of a architectural question. I like to know what people's opinion on how to properly handle errors in a fully Object Oriented PHP environment.</p>

<p>For example I have a class that retrieves all user data from the database. So I would use it in this way:</p>

<pre><code>$userData = new UserDataConnection();
$userData-&gt;openDatabase();
$userData-&gt;retrieveData();
$userData-&gt;showData();
$userData-&gt;closeDatabase();
</code></pre>

<p>At each of these steps, an error could have potentially occurred. So would I return a boolean from each step stating whether the function has successfully executed (hence the error checking is within each function), or do I do a try-catch exception handling around the whole thing? or is there a better way?</p>

<p>Is it also better to always go to some kind of error page when some kind of error occur?</p>
