lua-users home
lua-l archive

Re: lua.c dolibrary not installing traceback - bug or by design?

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


> Let load.lua contain this:
> 
> function f() error'fail' end; f()
> 
> Running any of these produces an error and traceback:
> 
> lua load.lua
> lua -e 'require "load.lua"'
> 
> But running this produces an error with no traceback:
> 
> lua -lload
> 
> This occurs because dolibrary in lua.c does not install traceback. It could do
> so if the pcall is replaced with a docall as in dofile and dostring.
> 
> Is this behavior intentional?
Not at all. This is a bug. Thanks for the report.
-- Roberto

AltStyle によって変換されたページ (->オリジナル) /