[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: loop or previous error on second module load attempt - likely bug
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Tue, 22 Mar 2011 14:44:44 +0100
2011/3/22 David Manura <dm.lua@math2.org>:
> in Lua 5.1.4 (patch-lua-5.1.4-3) through lua-5.2.0-work5, if a module
> fails to load and we later reattempt to load the module, we get an odd
> error due to inconsistent sentinel state (another need for resource
> cleanup on scope exit maybe):
I've been stuck with the same problem in the past. I came to the
conclusion that if a module loading might fail, it should do so early
or in a clean way. This usally means that any problem (including
missing dependencies) should be detected and an error thrown before
calling 'module'. Unfortunately many existing modules don't.