Re: new push/pop error handlings

From: Date: Sun, 29 Jul 2001 01:46:37 +0000
Subject: Re: new push/pop error handlings
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1106@lists.php.net to get a copy of this message
yavor shahpasov wrote: > > This is very cool and maybe I'm missing a bit on the discussion, but > shouldn't it be integrated into the current raseError functionality, maybe > if the error is not displayed push it to the error stack and set a > errorOccured flag. Then each getMessage would pop it out. > Yes, this was discussed also. My idea was to provide a method to raise the error contained in a error object. $this->pushErrorHandler(PEAR_ERROR_RETURN); $error = $db->query(..); $this->popErrorHandlier(); if (DB::isError($error)) { // this will act much similar as // $this->raiseError($error->getMessage()); return $this->raiseErrorObj($error); } Other ideas? Tomas V.V.Cox PS.- I made some minor modification of push/pop and I'll commit it soon.

« previous php.pear.dev (#1106) next »