Re: [SOAP] Common Error Catching Practice
| From: | Tony Bibbs | Date: | Thu, 31 Oct 2002 14:29:48 +0000 |
| Subject: | Re: [SOAP] Common Error Catching Practice | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-296@lists.php.net to get a copy of this message | ||
On the server you may want to implement your own custom error handler.
See set_error_handler(). In your custom handler you can gracefully handle
most errors without stopping script execution and send back a valid SOAP
fault. Your code should do error checks and call trigger_error() when
necessary.
Hope that helps. I'm sure others may handle this differently,
--Tony
On Thu, 31 Oct 2002, Emre Bastuz wrote:
> Hi,
>
> some time ago I wrote my first SOAP based script.
>
> The hardest thing was that common errors in the PHP script
> (missing brackets, missing ";" etc.) are not shown when
> a SOAP client communicates with a SOAP server - instead I
> usually got the message "Server could not build response".
>
> This usually leaves no clue to what is going wrong and makes
> troubleshooting/debugging quite painsome.
>
> What are you guys doing to catch those kind of errors and
> display them?
>
> Thanks,
>
> Emre
>
>