Page 1 of 1

Pear-Error-Handling in own classes

Posted: Tue May 27, 2003 12:08 pm
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 !!