SOAP package's error handling

From: Date: Fri, 03 Oct 2003 10:28:25 +0000
Subject: SOAP package's error handling
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8250@lists.php.net to get a copy of this message
Hi all, I'm having a problem with error handling and the (otherwise excellent) SOAP_Server class. In the soap package's Server.php (typically /usr/local/lib/php/SOAP/Server.php) file I see this fragment of code: --------------- $soap_server_fault = null; function SOAP_ServerErrorHandler($errno, $errmsg, $filename, $linenum, $vars) { global $soap_server_fault; $detail = "Errno: $errno\nFilename: $filename\nLineno: $linenum\n"; // XXX very strange behaviour with error handling if we =& here. $soap_server_fault = new SOAP_Fault($errmsg, 'Server', 'PHP', $detail); } --------------- In addition, somewhere in the server class, ALL error reporting is set to be handled through this function, disregarding any error reporting settings the application may have. So here's my problem: in my logic that facilitates some errors are triggered with level E_USER_NOTICE. Now suddenly the soap class decides it is entitled to handle these, which it ofcourse shouldn't be :-) How can i handle this without hacking in to the Server.php code? Regards, Hans

« previous php.pear.general (#8250) next »