Re: Unicode conversion exceptions and memory leaks

From: Date: Thu, 13 Apr 2006 22:56:18 +0000
Subject: Re: Unicode conversion exceptions and memory leaks
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-22741@lists.php.net to get a copy of this message
By default type conversions will just output a warning. You will get exceptions if you set the U_CONV_ERROR_EXCEPTION flag. -Andrei On Apr 13, 2006, at 3:52 PM, Andi Gutmans wrote:
As you know, exceptions were designed to be user-land and not for internal functionality. I warned about that more exceptions were being integrated into the extensions; and I especially warned of ideas of integrating them into language constructs such as type hints and conversions. I don't have a good solution for this right now, except for adding a lot of bulk to C extensions and the core and making them overly complicated. Anyway, I'll discuss with Dmitry and see if he has any ideas I didn't think of. re: this specific case. Is it really a good idea for a type conversion to throw an exception? People won't be expecting that from reading the code. They'd most likely only expect methods to throw exceptions... Andi


« previous php.internals (#22741) next »