Zend Framework

Flag to allow throwing exceptions from the server

Details

  • Type: Improvement Improvement
  • Status: Postponed Postponed
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.5.1
  • Fix Version/s: None
  • Labels:
    None

Description

Flag to allow throwing exceptions from the server.

Example:

$server->throwExceptions(true);

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.

Activity

Hide
Matthew Weier O'Phinney added a comment -

Scheduling for next minor release.

Show
Matthew Weier O'Phinney added a comment - Scheduling for next minor release.
Hide
Matthew Weier O'Phinney added a comment -

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.

Show
Matthew Weier O'Phinney added a comment - 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.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated: