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
Posted by Satoru Yoshida (satoruyoshida) on 2009-10-14T01:11:40.000+0000
Hi, Luke. Do you also need to change parameter of next throw ?
Posted by Luke Richards (lukerichards) on 2009-10-14T04:48:10.000+0000
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.
Posted by Satoru Yoshida (satoruyoshida) on 2009-10-15T04:09:01.000+0000
Thank you for comment, Luke.
I remove echo and add $e->getMessage() to throw parameter at SVN trunk 18544.
Posted by Satoru Yoshida (satoruyoshida) on 2009-10-18T17:43:39.000+0000
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.
Posted by Satoru Yoshida (satoruyoshida) on 2009-10-25T01:43:09.000+0000
Change status because no responce in several days.
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2009-10-25T06:36:12.000+0000
My bad. Wasn't aware I assigned this issue to me, let alone why...
Posted by Satoru Yoshida (satoruyoshida) on 2009-10-26T20:23:26.000+0000
I see, Dolf. Never mind ;)