Hey guys,
Another n00b question: What is the proper way to return from a function
after throwing an exception? My code looks like:
zend_throw_exception(amqp_connection_exception_class_entry, "blah blah
blah", 0 TSRMLS_CC);
return;
Should I instead RETURN_FALSE from there?
Thanks,
Pieter
Hey guys,
Another n00b question: What is the proper way to return from a function
after throwing an exception? My code looks like:zend_throw_exception(amqp_connection_exception_class_entry, "blah blah
blah", 0 TSRMLS_CC);
return;Should I instead RETURN_FALSE from there?
It doesn't really matter, as return value will never be checked.
"return" should be enough
--
Alexey Zakhlestin
http://www.milkfarmsoft.com/
Hi Pieter:
zend_throw_exception(amqp_connection_exception_class_entry, "blah blah
blah", 0 TSRMLS_CC);
return;
These kinds of questions (regarding how to use PHP) should be asked on
the php-general list. The internals list you wrote to is for discussions
of how to make PHP.
Anyway, the "return" line in your code can never be reached, so should
not be there at all.
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
On Fri, Jun 11, 2010 at 19:24, Daniel Convissor
danielc@analysisandsolutions.com wrote:
Hi Pieter:
zend_throw_exception(amqp_connection_exception_class_entry, "blah blah
blah", 0 TSRMLS_CC);
return;These kinds of questions (regarding how to use PHP) should be asked on
the php-general list. The internals list you wrote to is for discussions
of how to make PHP.
Which part of "zend_throw_exception()" sounds like a php-general@ question?
I think you misread his question :)
-Hannes
Hi Hannes:
Which part of "zend_throw_exception()" sounds like a php-general@ question?
DOH!
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409