Hi,
try {
    $opts = new Zend_Console_Getopt(array(
        'id=i' => 'id option,required an integer parameter'
    ));
    $opts->parse();
    echo $opts->id;
} catch (Zend_Console_Getopt_Exception $e) {
    echo $e->getMessage();
    echo $e->getUsageMessage();
    exit();
}
If I run this snippet above without parameter
like ./myscript.php I'm waiting an exception instead the script fails
without error.
Is it the a feature or I miss something ?
Thanks in advance
Bye


--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Zend-Console-Getopt-manage-if-there-no-options-tp3651587p3651587.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to