lua-users home
lua-l archive

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


It was thus said that the Great Sudipto Mallick once stated:
> Lua tells us where the error occured: the file name and line number.
> How can the line itself be printed in the stack traceback? Why does
> not Lua do that already?

  Because the "file" might not exist.

  At work, I compile a Lua application, plus all the modules (both in C and
Lua) into a single executable.  The modules written in Lua are compressed
(using zlib) and stored into the exectuable as blobs of data that the custom
loader knows how to uncompress and hand back to Lua.  There is no "file" to
speak of, but it can still report useful information:

	[string "org.conman.example"]:32: attempt to call a nil value (global 'print')

  -spc