ZF-8034: echo exception message in the code

Description

Specifically, SVN revision 18493 (branch 1.8) also seems to be in trunk.

Line 595 (601 in trunk) catches exception caused when creating an object. The exception gets caught but there is a statement which echo's the exception message. This shouldn't be there. It causes problems for other content returned, like headers and correctly formed XML.

Also the message from the exception is completely lost.

Comments

Hi, Luke. Do you also need to change parameter of next throw ?


new Zend_Rest_Server_Exception('Error instantiating class ' . $class . ' to invoke method ' . $this->_functions[$this->_method]->getName(), 500);

Hi,

I think so, unless there is a good reason not to it would be a good idea to change it to include the message from the caught exception.

I'm not sure what exactly but something like: new Zend_Rest_Server_Exception('Error instantiating class ' . $class . ' (' . $e->getMessage() . ')', 500);

I hope that helps.

Thank you for comment, Luke.

I remove echo and add $e->getMessage() to throw parameter at SVN trunk 18544.

Hi, Dolf. I find you changed Assignee after my commit. Do you have any idea on this issue? I will reopen this issue for you.

Change status because no responce in several days.

My bad. Wasn't aware I assigned this issue to me, let alone why...

I see, Dolf. Never mind ;)