note 62527 added to function.use-soap-error-handler
| From: | msynak dot no dot spam dot please at wp dot pl | Date: | Thu, 02 Mar 2006 14:45:28 +0000 |
| Subject: | note 62527 added to function.use-soap-error-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-104707@lists.php.net to get a copy of this message | ||
This function seems to disable/enable automatic error reporting through SOAP. Use it to prevent user
"on the other side" from seeing internal errors of your application.
Sometimes it is better to send no answer at all than to inform users that your application has e.g.
parse errors.
Usage:
// disable error reporting
use_soap_error_handler(false);
// enable error reporting
use_soap_error_handler(true);
Default state of soap error handler is ENABLED.
It seems that the best practice is to disable it in constructor of your SOAP request handling class
and enable in destructor.
For some situations, you may want to create your own error handling function instead (see
set_error_handler and set_exception_handler) and throw custom SoapFaults with info like: "We
have technical difficulties at the moment. Sorry!".
----
Server IP: 81.223.254.85
Probable Submitter: 195.205.175.4
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.use-soap-error-handler.php
Edit -- http://master.php.net/note/edit/62527
Del: integrated -- http://master.php.net/note/delete/62527/integrated
Del: useless -- http://master.php.net/note/delete/62527/useless
Del: bad code -- http://master.php.net/note/delete/62527/bad+code
Del: spam -- http://master.php.net/note/delete/62527/spam
Del: non-english -- http://master.php.net/note/delete/62527/non-english
Del: in docs -- http://master.php.net/note/delete/62527/in+docs
Del: other reasons-- http://master.php.net/note/delete/62527
Reject -- http://master.php.net/note/reject/62527
Search -- http://master.php.net/manage/user-notes.php