Hello l0t3k,

Friday, June 20, 2003, 4:56:01 PM, you wrote:


l> "George Schlossnagle" <[EMAIL PROTECTED]> wrote in message
l> news:[EMAIL PROTECTED]
>>
>> On Friday, June 20, 2003, at 10:04  AM, l0t3k wrote:
>> Why don't use just throw an exception yourself in your extension code?
>> I'm for errors as exceptions (obviously), but that is only necessary
>> for legacy code.  In your own new code, raise an exception if you feel
>> like it.
l> my problem is that its double work. IOW, zend_parse_parameters has already
l> done a good job of parsing and figuring out what went wrong for what reason.
l> i'd like to be able to use the error message generated by z_p_p rather than
l> having to figure things out myself. id also like to suppress its generation
l> of an error, since it would be redundant in the face of the exception.

l> i've actually considered creating a parallel zend_parse_parameters which has
l> the required semantics. i'd like to hear other people's takes first, though.

I don't know if it really fits your needs but the current api allows you to
convert all warnings to exceptions. That is no error is displayed during the
parameter parsing process. So at the end you could even check for the
exception and decide what to do with it since it executes its exception
behavior only when the zif_function() call ends and the opcode handler "finds"
the exception being thrown.

regards
marcus



-- 
Best regards,
 Marcus                            mailto:[EMAIL PROTECTED]


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to