[dev] Re: [cvs] commit: turba/lib Driver.php sam/lib Driver.php orator/lib Slide.php odin/lib Driver.php LogParser.php moment/lib View.php mnemo/lib Driver.php kronolith/lib Driver.php klutz/lib Driver.php ingo/lib Script.php

Chuck Hagenbuch chuck at horde.org
Tue Apr 29 00:22:42 PDT 2003


Quoting Jan Schneider <jan at horde.org>:

> We are still very inconsistent how we handle failing factory methods.

There's some method to this, actually.

> We return a PEAR_Error (mostly in the Horde libs), false or call
> Horde::fatal().
>
> We should agree on one way to handle this and fix all factory methods
> that don't follow this scheme.

Well, the thing is whether or not failure is fatal, or whether it can be
handled gracefully somehow. If something like the registry fails, we should
really just bail out. If it's something we can live without, or just inform
the user that it didn't work - like a Turba source - then we should return
*and* handle an error.

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
The alligators were there, too, in a bathtub inside the house.


More information about the dev mailing list