ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pear-dev
pear-dev
[PEAR-DEV] [PEPr] +1 for Networking::Net_MAC
by Greg Beaver other posts by this author
Dec 13 2006 11:56AM messages near this date
[PEAR-DEV] [PEPr] Proposal for Networking::Net_CheckMAC | [PEAR-DEV] Re: [PEPr] +1 for Networking::Net_MAC
Greg Beaver (http://pear.php.net/user/cellog) has voted +1 on the proposal for Networking::N
et_MAC.

Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=454
Vote information:
http://pear.php.net/pepr/pepr-vote-show.php?id=454&handle=cellog

This vote is conditional. The condition is:

This code:

        try {
            if (!isset($options['vendorcol'])) {
                throw new PEAR_Exception('No vendor column name given in options');
            }
        } catch (PEAR_Exception $e) {
            throw $e;
        }

is redundant and unnecessary.  Just do:

        if (!isset($options['vendorcol'])) {
            throw new PEAR_Exception('No vendor column name given in options');
        }

In addition, you should not be using the raw PEAR_Exception.  It should have either a code, 
or be customized.  You can do this with a 1-liner

class Net_MAC_Exception extends PEAR_Exception {}

The last issue is critical - you should not be using PEAR_Exception raw.  The first one is c
osmetic but will also affect performance so you should do it :).

-- 
Sent by PEPr, the automatic proposal system at http://pear.php.net

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Andrew Teixeira
Greg Beaver
Andrew Teixeira
Justin Patrin
Christian Weiske
Andrew Teixeira
Andrew Teixeira
Arnaud Limbourg
Justin Patrin
Andrew Teixeira
Andrew Teixeira
Andrew Teixeira
Stefan Neufeind
Arnaud Limbourg
Justin Patrin
Graham Christensen

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved