3 things about error reporting you need to know
- Most of time errors are fatal for the application and it is useless to continue.
In this case no pages nor page bottoms to be executed but a generic 503 error page to be shown.
To handle errors this way - just put one application-wide try-catch block at the very top and very bottom of script and set appropriate exception handler.
- Some errors are not fatal. To catch these you have to wrap your not-so-important code into local try-catch, catch the error and then continue execution.
- Instead of bottom of the page, you have to collect all your errors in the error log Set appropriate error handler for this