Re: [PEPr] Comment on Networking::GeoIP

From: Date: Wed, 16 Jun 2004 14:22:57 +0000
Subject: Re: [PEPr] Comment on Networking::GeoIP
References: 1 2 3 4 5 6 7  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30769@lists.php.net to get a copy of this message
David Costa wrote:
Hello Mike, thanks for your help ;) quick follow up: so e.g. if (!@$scanned) {
            return PEAR::raiseError(self::MP3_PLAYLIST_OPENDIR_FAILED,
                                    -1, PEAR_ERROR_PRINT);
        }
can be re-written as if (!@!@$scanned) {
            throw new Exception(self::MP3_PLAYLIST_OPENDIR_FAILED);
        }
right ?
Yup, that's right. Also, you don't need to explicitly check whether method calls return exceptions since they will naturally bubble-up. I sent you a w/ Exceptions version of MP3/Playlist.php and for fun MP3/Id.php too -- since that has PEAR dep. HTH, Hans

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