Re: Exceptions was Basic DB/MDB Question

From: Date: Wed, 23 Mar 2005 01:10:02 +0000
Subject: Re: Exceptions was Basic DB/MDB Question
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18254@lists.php.net to get a copy of this message
On 23/03/2005, at 11:41 AM, Greg Beaver wrote:
<?php require_once 'PEAR/ErrorStack.php'; function useErrorStack($err) {
    PEAR_ErrorStack::staticPush('PEAR_Error', 'error',
        array('olderror' => $err), $err->getMessage());
} PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'useErrorStack'); ?>
Thanks I'll give this a shot. I personally have to side with Lukas, doing try/catch all over the place slows down development on prototyping. There are however UML modelling software in the midst. And I have had discussions with c++ developers on this, adding the exception code while you are coding however helps debugging later on, rather than going back and having to add them all in later. Which is how I feel errorStack which uses exceptions may be a better option but I am gonna try this out.

« previous php.pear.general (#18254) next »