Re: PEAR_Exception in CVS

From: Date: Sun, 20 Jun 2004 20:58:23 +0000
Subject: Re: PEAR_Exception in CVS
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30979@lists.php.net to get a copy of this message
Hans Lellelid wrote:
There's a problem here (I believe) with accessing these properties if $obj != $this (as they are not public). I think I do understand why you are doing it this way, however ... Would this work just as well like: public function getCauseMessage() {
  $msg = '     ' .   $this->method . " at {$this->file} ({$this->line})\n";
if ($this->cause instanceof Exception) {
    return $msg . $this->cause->getCauseMessage();
} return $msg; } It's making my head spin a little, but that should still handle the recursion .... right?
Thinking on it, will better go with 'protected', there is no point on making avaible this very customized method. There is getCause() for those who want to play with it. Tomas V.V.Cox

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