"Zeev Suraski" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> All in all, I would definitely not see errors-as-exceptions as a
> pre-requisite for the beta.  It's not an issue to be dealt with lightly,
> and we probably won't have time to finalize it in the next few days that
we
> have left.
>
fair enough. but in the absence of that solution, the one thing i would
greatly appreciate is a modification to
zend_parse_parameters (a new parameter ?) to either :
 1.)  return the text of error messages without raising a warning itself.
that way i can raise an IllegalArgumentException or somesuch myself
 2.)  create and raise an IllegalArgumentException (or just Exception) of
its own.

right now my code is written assuming something like the second would happen
(with the new parameter). so barring that, im in the position of either
 1. using only PHP errors (not nice for an OOP exception, especially in
constructors)
 2. having both an exception and regular error raised (since this is the
default of zend_parse_parameters)
<code>
  if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS()TSRMLS_CC, "l",
&length)) {
     RAISE_AN_ILLEGAL_ARGUMENT_EXCEPTION("Bad value for length parameter.")
   return;
  }
</code>
 3. reverting to the old parameter parsing API to handle things myself
 4. do like Marcus and implement a boatload of
exception-rainsing-parameter-parsing stuff myself and hope it gets into the
engine <g>

l0t3k




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

Reply via email to