Re: Re[2]: Return or not to return, that is the question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 5/30/2007 10:51 AM, Richard Lynch wrote:
On Wed, May 30, 2007 12:00 pm, Paul Novitski wrote:
[snip] use the archives

Good suggestion!


HOWEVER: it is not a good idea, imho, to "always" let the errors
bubble up to the outer layer, which is what Paul seemed to have
typed...

But didn't.


The problem with that approach is that you end up being painted into a
corner where your application can do little more than print "It
broke." because the low-level context is not available to the caller
of the function.

If you'll refer back to my posting to which you're replying without quoting, you'll read:

At 5/30/2007 10:00 AM, Paul Novitski wrote:
Because a low-level error may in turn trigger higher-level errors as it bubbles back up, it may make sense to turn this into an error stack to which each calling function adds its understanding of the problem as the error bubbles back up:
...
When a high-level function receives an error state from a called function, it can (if desired) walk down the stack to learn the technical origin of the error as well as its implications during the bubble-up.

It sounds like we're on the same page, Richard!

Regards,

Paul
__________________________

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux