Re: cvs: pecl /perl README php_perl.c /perl/tests perl002.phpt perl007.phpt perl019.phpt perl020.phpt perl070.phpt
| From: | Andi Gutmans | Date: | Thu, 11 Mar 2004 09:56:39 +0000 |
| Subject: | Re: cvs: pecl /perl README php_perl.c /perl/tests perl002.phpt perl007.phpt perl019.phpt perl020.phpt perl070.phpt | ||
| References: | 1 2 3 4 | Groups: | php.pecl.cvs |
| Request: | Send a blank email to pecl-cvs+get-1059@lists.php.net to get a copy of this message | ||
At 10:41 AM 3/11/2004 +0100, Derick Rethans wrote:
On Thu, 11 Mar 2004, Andi Gutmans wrote: At 09:27 AM 3/11/2004 +0100, Derick Rethans wrote:a) The Perl extension is written mostly as OOP (due to problems with with return values). b) As you can't "return" an error as a value (because it could be a valid value) you pretty much have to throw an exception. Otherwise, you'd have to return something like a PerlError object and that's kind of sucky. AndiOn Thu, 11 Mar 2004, Dmitry Stogov wrote:We throw them in SOAP, DOM, SPL, Reflection etc... But both of these are all "pure" OO extensions, throwing an exception for a SOAP fault makes sense. But why create an exception out of a normal perl error? That sounds wrong to me as it creates something that isn't originally there. (If perl throws an exception, than throwing an exception in PHP is fine of course).hmm? I thought we agreed on not throwing exceptions from internal functions. I don't think it's a good idea to have the perl extension being an exception to this.dmitry Thu Mar 11 03:12:01 2004 EDTAdded files:/pecl/perl/tests perl070.phptModified files:/pecl/perl README php_perl.c /pecl/perl/tests perl002.phpt perl007.phpt perl019.phpt perl020.phptLog: Using PHP exceptions to report Perl errors.