Posted by Marcin Dobrucki on 09/19/05 14:13
Oli Filth wrote:
> Marcin Dobrucki said the following on 16/09/2005 13:37:
> What? How does that help?
> If initialize() "fails" then the constructor has still "failed"...
Close, but there are some benefits:
"initialize" can do some gracious exist upon failure, still allowing
you to create an object (albeit sans whatever the initalization was
supposed to do, like values from DB or something). This is somewhat
useful in avoiding getting the "method called on a non-object" errors.
/Marcin
Navigation:
[Reply to this message]
|