RE: [PEAR] XML-RPC and PEAR_Error
| From: | Michael Caplan | Date: | Mon, 13 Jun 2005 19:17:14 +0000 |
| Subject: | RE: [PEAR] XML-RPC and PEAR_Error | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-19610@lists.php.net to get a copy of this message | ||
Ahh, I see that this issue was mostly cleaned up in XML_RPC 1.3.0. I forgot
the perennial rule of upgrade before opening my mouth. Sorry about that.
However, there are two issues still. One is XML_RPC_Client::errstr vs.
XML_RPC_Client::errstring. I was always checking XML_RPC_Client::errstring.
Enough talking to myself.....
Michael
> -----Original Message-----
> From: Michael Caplan [mailto:michael.caplan@lechateau.ca]
> Sent: Monday, June 13, 2005 10:34 AM
> To: 'pear-general@lists.php.net'
> Subject: [PEAR] XML-RPC and PEAR_Error
>
> Hi there,
>
>
>
> I am trying to resolve an issue I ma having with successfully trapping
> PEAR_Errors raised with XML_RPC library. When sending a from the client,
> sendPayloadHTTP10 returns 0 on an error, and raises a PEAR_Error. Also,
> sometimes, and only sometimes, the $this->errormsg string is populated
> with
> a message on what went wrong. So, I cannot rely on errormsg to be
> populated, and it doesn't look like PEAR_Error is used in any consistent
> or
> meaningful way. To quote the inline docs:
>
>
>
> /*
>
> * Just raising the error without returning it is strange,
>
> * but keep it here for backwards compatibility.
>
> */
>
>
>
> And I agree. In order to not compromise backward compatibility could not
> as
> a minimum $this->errormsg be set with the error raised consitently? Or
> perhaps I am looking at this issue the wrong way. Is there a better way
> to
> go about error handling?
>
>
>
> Thanks,
>
>
>
> Mike
>
>
>
>
> CONFIDENTIALITY NOTICE
> This message contains confidential information intended only for the use
> of
> the individual or entity named as recipient. Any dissemination,
> distribution
> or copying of this communication by anyone other than the intended
> recipient
> is strictly prohibited. If you have received this message in error, please
> immediately notify us and delete your copy. Thank you.
>
> AVIS DE CONFIDENTIALITÉ
> Les informations contenues aux présentes sont de nature privilégiée et
> confidentielle. Elles ne peuvent être utilisées que par la personne ou
> l'entité dont le nom paraît comme destinataire. Si le lecteur du présent
> message n'est pas le destinataire prévu, il est par les présentes prié de
> noter qu'il est strictement interdit de divulguer, de distribuer ou de
> copier ce message. Si ce message vous a été transmis par mégarde, veuillez
> nous en aviser immédiatement et supprimer votre copie. Merci.