RE: [PEAR-DEV] Re: common error handling problem - a PFC issue?

From: Date: Mon, 28 Jul 2003 19:37:16 +0000
Subject: RE: [PEAR-DEV] Re: common error handling problem - a PFC issue?
References: 1  Groups: php.pear.dev php.pear.qa 
Request: Send a blank email to pear-dev+get-18841@lists.php.net to get a copy of this message
> From: Matthias Nothhaft [mailto:matthias.nothhaft@gmx.de] > Sent: Monday, July 28, 2003 9:21 PM > That's why I think that it has to be a duty for PFC packages > to provide error codes (and optionally messages) and > a documentation what error codes mean! > But I also see a problem with error codes: > What if we have a class/object hierarchy and > an error code comes from a "parent's method". > -> We need a possibility to get the exact location > of the 'real' error (also nice for debugging). Ok lets keep the discussion on error codes for now. I agree that this sounds like a good idea. Common error codes might be overshooting the target in terms of regulations probably though. You do raise another interesting point that might be a good thing to think about and that I also remember wondering about while developing MDB: how do you propagate errors correctly. Say you call one method that returns a PEAR error within another method. Should you simply return the original error object. Probably not. Should you simply construct a new error message. To me the latter sounds like the right way to go. And then you should try to embed enough info in the error message to make debugging possible. > Another question: Is this the right mailing list for this > discussion? or is there a better one? Actually this discussion may fit better in pear-qa and that is why I am moving it here (dunno what the best method is for moving a thread to a different ML - so please everybody who wants to join the discussion join pear-qa and all replies should not be directed to pear-dev).

« previous php.pear.dev (#18841) next »