ZF-3102: Flag to allow throwing exceptions from the server
Description
Flag to allow throwing exceptions from the server.
Example:
Sample:
$server->throwExceptions(true); try { echo $server->handle(); } catch (MyPersonalException $e) { echo $server->fault($e); } catch (Exception $e) { // do other things like logging, email the admin as this was an unexpected error. echo $server->fault(new Exception('An unknown error occured. Please try again.')); } ```
This would bring the server components more inline with the PHP SoapServer API.
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2008-05-09T11:55:24.000+0000
Scheduling for next minor release.
Posted by Matthew Weier O'Phinney (matthew) on 2008-08-04T13:33:28.000+0000
Actually, for Zend_XmlRpc_Server, you can already specify exceptions that you will allow the server to report as fault exceptions. Zend_Rest_Server does not have this functionality currently however.
I'm going to postpone this issue to 1.7.0; we now have four server implementations (and a fifth on the way), and I want to review and consider this implementation for all of them.