lua-users home
lua-l archive

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


Thomas Lauer wrote:
> However, if the error occurs in connection with a module (if, for
> example, someone refers to a non-existent function or variable in a
> module), the message doesn't show the name of the module. For all
> user-defined modules this is in module._NAME, so I can easily
> retrieve and print it.    

Not all user-defined modules have _NAME, _M and _PACKAGE. Only the
modules calling the 'module' function of the base Lua API do. If you
have control on all your modules you can assume that, but for
third-party modules this is not a requirement.