Are there patterns for handling errors in PHP projects?
<p>I wonder what patterns are there for handling errors in PHP?</p>

<p>I'm close to just make an global ErrorManager object which has methods to add messages. As my entire app gets compiled, any occuring error is logged to that ErrorManager object. At the end of my Front Controller (the last few lines of the script) I tell the ErrorManager to display errors (if any). One fancy thing I thought about: Visitors really don't care about technical details. Instead they should receive an beautiful error page with a big "SORRY" and an info that the error was reported. Then, the ErrorManager sends an E-Mail to the admin with all available information and logs that stuff to a error log file. This file can be seen through the backend, to make development easy.</p>

<p>No idea if this is a good strategy. I bet you know better ones :-)</p>
