Pear-Error-Handling in own classes

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Dummkopf
Forum Newbie
Posts: 21
Joined: Sat May 24, 2003 1:54 pm

Pear-Error-Handling in own classes

Post by Dummkopf »

Hi all,

in my project there are many classes which have to get an 'Error-Mangement-System'. I thought about making them all children of Pear, to get an adequate Error-class.

My question is how to handle all these Error-Objects. Every error has (optionally) to be printed on the screen and written into the DB.

I don't want to have a global function, I'd better like to have a kind of ErrorLog-class.

How does this class has to be structured, how should I give the Pear-Errors to it and how could the errors be born?

Of course I already made tried some things out for myself, but I don`t believe that I found an optimal solution.

I´d be thankful for any help !!
Post Reply