Error handling without specific try/catch blocks
Posted: Sat Aug 01, 2009 10:07 am
Anytime an error/exception occurs in my php 5 code, I'd like to have the specific error written to a table along with other info (user, date, etc.) and have a more user-friendly message sent to the user. These user-friendly messages could be fairly generic (maybe 10 or 20 different ones in total) or they could be more specific if that doesn't require a lot more coding.
I'm somewhat familiar with the try/catch methodology, but it seems like I would have to put in a lot of extra code all through each program to achieve this. Is there a way to have exceptions/errors handled without all of those specific try/catch blocks?
Thanks.
I'm somewhat familiar with the try/catch methodology, but it seems like I would have to put in a lot of extra code all through each program to achieve this. Is there a way to have exceptions/errors handled without all of those specific try/catch blocks?
Thanks.