Re: Change to Too Few Args Exception RFC

From: Date: Tue, 16 Aug 2016 13:44:51 +0000
Subject: Re: Change to Too Few Args Exception RFC
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-95230@lists.php.net to get a copy of this message
Hey all, Can we please reach a resolution on this? - Davey On Sun, Aug 7, 2016 at 9:04 AM, Davey Shafik <davey@php.net> wrote: > AFAICT, to make this change, I'd have to modify: > > ZEND_API ZEND_COLD void zend_internal_type_error(zend_bool > throw_exception, const char *format, ...) /* {{{ */ > > To be: > > ZEND_API ZEND_COLD void zend_internal_type_error(zend_bool > throw_exception, zend_class_entry *zend_error, const char *format, …) /* > {{{ */ > > Which… would be a BC break for extensions perhaps? > > There is also zend_type_error, I'm not sure how that relates, I don't > think it gets used in this case. Or, I could add zend_(internal_?)argument_count_error > and use that instead. > > Thoughts? > > - Davey > > > On Sat, Aug 6, 2016 at 4:10 AM, Thomas Punt <tpunt@hotmail.co.uk> wrote: > >> Hi! >> >> > From: me@kelunik.com >> > >> > I don't like "ArgumentError", how about >> > "WrongArgumentCountError"? Maybe >> > also "WrongArgumentsError". >> >> I'd favour simply ArgumentCountError. No need to prepend a "wrong" to the >> error class name - we can already guess it's wrong because it has >> resulted in >> an error :) >> >> -Tom >> > >

« previous php.internals (#95230) next »