Re: Change to Too Few Args Exception RFC

From: Date: Sat, 06 Aug 2016 23:04:04 +0000
Subject: Re: Change to Too Few Args Exception RFC
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-94888@lists.php.net to get a copy of this message
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 (#94888) next »