Re: Exceptions and Errors

From: Date: Thu, 15 Apr 2004 21:29:40 +0000
Subject: Re: Exceptions and Errors
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to internals+get-9235@lists.php.net to get a copy of this message
On Apr 15, 2004, at 5:21 PM, Marcus Boerger wrote:
Hello Christian, Thursday, April 15, 2004, 1:06:20 PM, you wrote:
cm@leetspeak.org wrote:
"modern dynamic" languages in that context, as for instance in Python there is no error handling but by using exceptions).
Sorry but that's simply wrong. Python methods can return false or null as much as PHP methods can. It might be a lot more _common_ to use exceptions but there are options. And the exception part is the one I don't like about Python anyway ;-)
Still a ctor cannot return a value.
Supporting this, if you look through the Python standard library you will see that exceptions are the employed method for handling constructor failures. George

« previous php.internals (#9235) next »