In asp.net I can easily redirect the user to a customer error page if there's an unhandled error in the page by putting this on the web.config:
<customErrors mode="RemoteOnly" defaultRedirect="Oops.aspx" />
I studying php right now and what I want to happen is redirect the user to another page if there's an unhandled error.