Re: [SOAP] Re: E_ERROR in SoapClient

From: Date: Fri, 31 Jul 2009 15:50:15 +0000
Subject: Re: [SOAP] Re: E_ERROR in SoapClient
References: 1 2  Groups: php.soap 
Request: Send a blank email to php-soap+get-2966@lists.php.net to get a copy of this message
2009/7/31 Paulo Azevedo <halufa@gmail.com>: > My problem is that SoapClient triggers a E_ERROR ( Fatal Error ) instead of > throwing an Exception. > Since E_ERROR cannot be catchable I don't find a way to gracefully handly > this problem. > > PHP Fatal error:  SOAP-ERROR: Encoding: object hasn't 'profileData' property > > > Is there any way to gracefully catch this error? > > -- > -Paulo > http://twitter.com/halufa > You can tell the SoapClient to generate exceptions rather than errors. [1] "The exceptions option is a boolean value defining whether soap errors throw exceptions of type SoapFault." Regards, Richard. [1] http://docs.php.net/manual/en/soapclient.soapclient.php -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" ZOPA : http://uk.zopa.com/member/RQuadling

« previous php.soap (#2966) next »