lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org]
> On Behalf Of steve donovan
> Sent: vrijdag 28 september 2012 10:12
> To: Lua mailing list
> Subject: Re: require() multiple parameters
> 
> On Fri, Sep 28, 2012 at 9:52 AM, Thijs Schreijer
> <thijs@thijsschreijer.nl> wrote:
> > One thing that comes to mind is how to handle errors; in the example,
> > if 'butter' either isn't available or throws an error, what to return
> then?
> 
> That's probably a good answer to your original question ;)  Although I
> think we can assume that loading modules should fail in a noisy way by
> throwing an error, hence the old pcall(require,'mod') trick.  I would
> _not_ expect require() to return me an error message!
> 
> steve d.

Not my question :) but I agree that it seems a reason to keep it as it is.