Nmap Development mailing list archives
Re: [NSE] Better Handling for Require Errors
From: Patrik Karlsson <patrik () cqure net>
Date: Sun, 12 Jun 2011 21:41:23 +0200
On Jun 12, 2011, at 4:12 AM, Patrick Donnelly wrote:
On Sat, Jun 11, 2011 at 9:58 PM, Patrick Donnelly <batrick () batbytes com> wrote:As I see it we can do one of three things: (a) Go back to the old system. (b) Always print an error message. (c) Accept that require may be silenced for some border cases where we don't want it silenced. Script authors should be testing with -d... I'm partial to (c). I don't really like (a). I think (b) defeats the entire point. I'm open to suggestions...I just thought of another possibility. Since we added the stdnse.require function which is just the original function. Maybe instead we can keep require the same and add a stdnse.silent_require (so reverse them). Then people would use: stdnse.silent_require "openssl" I think that might be the best approach. What do you all think?
I think this sounds like the best solution to. This way we can still detect my typos while avoiding the nasty pcall and if-statement stuff.
-- - Patrick Donnelly _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
//Patrik -- Patrik Karlsson http://www.cqure.net http://www.twitter.com/nevdull77 _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: [NSE] Better Handling for Require Errors Patrick Donnelly (May 04)
- Re: [NSE] Better Handling for Require Errors David Fifield (Jun 07)
- Re: [NSE] Better Handling for Require Errors Patrick Donnelly (Jun 08)
- Re: [NSE] Better Handling for Require Errors Fyodor (Jun 09)
- Re: [NSE] Better Handling for Require Errors Patrick Donnelly (Jun 11)
- Re: [NSE] Better Handling for Require Errors Patrick Donnelly (Jun 11)
- Re: [NSE] Better Handling for Require Errors Patrik Karlsson (Jun 12)
- Re: [NSE] Better Handling for Require Errors Fyodor (Jun 12)
- Re: [NSE] Better Handling for Require Errors Patrick Donnelly (Jun 13)
- Re: [NSE] Better Handling for Require Errors Patrick Donnelly (Jun 08)
- Re: [NSE] Better Handling for Require Errors David Fifield (Jun 07)