Re: updated docs for Error_Raise

From: Date: Mon, 18 Aug 2003 23:39:03 +0000
Subject: Re: updated docs for Error_Raise
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20019@lists.php.net to get a copy of this message
I had a look through it yesterday. - a few comments... most of the error raising methods did not appear to have a message as a default argument. - while error codes are more flexible, messages make the code infinately easier to read.. the calling standard for the new methods appears to be [notice|warning|fatal....]($package,$errorcode,$options) would it not be better to follow the existing pear error format - and just utilize the options 'officially' ||*PEAR_Error::PEAR_Error*| ($message ,$code , $mode, $options , $userinfo)| where options includes package/userinfo etc.. While I can see the use for putting package in the error, - it's not something that is essential 100% of the time - eg. on a small project, where you may only just consider using PEAR_Error over returning true/false/string for errors, there is some logic in the current design that infers the level at which you use pear error, follows your complexity level - eg. beginners start with PEAR::raiseError("xxxx"), - and eventuall work their way to PEAR::raiseError("XXX",ERROR_X,PEAR_...,array('package'=>'MyPackage')) Regards Alan Greg Beaver wrote:
Hi, I updated a few mistakes in the examples found in the tutorial for Error_Raise thanks to Arnaud, http://www.chiaraquartet.net/apidoc Regards, Greg


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