Re: Re: Net Traceroute still needs some votes :-)

From: Date: Tue, 12 Aug 2003 16:16:51 +0000
Subject: Re: Re: Net Traceroute still needs some votes :-)
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19571@lists.php.net to get a copy of this message
Stefan Neufeind wrote:
Also adopted from Net_Ping and I believed that Net_Ping was generally agreed upon. Well if factory doesn't directly throw an error I'd need to use a variable for storing if a traceroute-prog was found, right? Or should I change the
            return PEAR::throwError(NET_TRACEROUTE_CANT_LOCATE_TRACEROUTE_BINARY_MSG, NET_TRACEROUTE_CANT_LOCATE_TRACEROUTE_BINARY);
into an: $this->_traceroute_path=''; return NULL; This way you wouldn't return an error but could optionally throw an error. Is that a good solution? Well, I'm currently a bit in doubt about the error-handling-things mentioned above.
Hi Stefan, Another alternative is to use raiseError(), and pass in PEAR_ERROR_TRIGGER as the error mode, and the error level (E_USER_ERROR/E_USER_WARNING) as the options parameter. Then you can still use PEAR errors and achieve both options. Greg

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