RE: [PEAR] Mail Error Capture?
| From: | Stefan Neufeind | Date: | Mon, 08 Mar 2004 15:39:26 +0000 |
| Subject: | RE: [PEAR] Mail Error Capture? | ||
| References: | 1 | Groups: | php.pear.general php.pear.qa |
| Request: | Send a blank email to pear-general+get-11154@lists.php.net to get a copy of this message | ||
Thank you. I'll take care of it and inform the authors.
Regards,
Stefan
On 6 Mar 2004 at 22:31, Ryan Farrington wrote:
> Book name: PHP MySql Website Programming: Problem - Design - Solution
> by Apress Publishing ISBN: 1-59059-150X
>
> That was my assumption so I started using the PEAR::isError and the
> code works but I don't know if the error functionality works... Ah
> well... As long as it works.
>
> -----Original Message-----
> From: Stefan Neufeind [mailto:stefan@neufeind.net]
> Sent: Saturday, March 06, 2004 7:24 PM
> To: Ryan Farrington; KOYAMA Tetsuji
> Cc: pear-general@lists.php.net
> Subject: Re: [PEAR] Mail Error Capture?
>
>
> On 7 Mar 2004 at 1:06, KOYAMA Tetsuji wrote:
>
> > At Sat, 6 Mar 2004 09:16:53 -0600,
> > Ryan Farrington wrote:
> > > Hey all,
> > > I got some sample code from a book that uses the following code:
> > >
> > > $_oMail =& Mail::factory("mail");
> > > if(Mail::isError($_oMail)){
> > > //do some error processing here
> > > }
> > >
> > > The issues become this: is there is no Mail::isError, and I realy
> > > don't know how Mail would generate an error that can be captured.
> > > Can anyone provide an example or a better description of what
> > > Mail.php does with errors?
> >
> > Mail class returns PEAR_Error object when error occured. It will be
> > able to check by using PEAR::isError. This is PEAR basics. :-)
> >
> > $_oMail =& Mail::factory('mail');
> > if (PEAR::isError($_oMail)){
> > //do some error processing here
> > }
>
> It could be that Mail once extended from PEAR when that book was
> written? In that case, yes, there might have been a Mail::isError
> printed some time ago - but it's not up-to-date. Which book are you
> refering to?