Catch error class
Moderator: General Moderators
-
fastfingertips
- Forum Contributor
- Posts: 242
- Joined: Sun Dec 28, 2003 1:40 am
- Contact:
Catch error class
I would like to make an error class to catch all the errors and drop them into a log file or table, so i would like to know if you can make me a recommendation to find best way to resolve this poblem. 
-
ilovetoast
- Forum Contributor
- Posts: 142
- Joined: Thu Jan 15, 2004 7:34 pm
This is one of the features of CEP (http://sourceforge.net/projects/cep).
We make use of the PEAR Error objects and maintain a global error array and at the end of the script execution all errors that are supposed to be logged are written to the logfile.
That is an oversimplification of how we do it (it is really cascading error objects), but it works really well.
The API that we use for our error handling is one command too so it is easy to have all the error checking you should have without losing readability.
-Jackson
We make use of the PEAR Error objects and maintain a global error array and at the end of the script execution all errors that are supposed to be logged are written to the logfile.
That is an oversimplification of how we do it (it is really cascading error objects), but it works really well.
The API that we use for our error handling is one command too so it is easy to have all the error checking you should have without losing readability.
-Jackson