[erlang-questions] luerl stacktraces

Max Lapshin max.lapshin@REDACTED
Sun Jan 18 09:26:50 CET 2015


Yes, I understand it.

So the solution may be exactly as you describe: keep track of current lua
stack. But I don't even understand where to put it.


On Sun, Jan 18, 2015 at 3:12 AM, Robert Virding <rvirding@REDACTED> wrote:

> Btw the reason that luerl gives you an erlang stacktrace and not a proper
> luerl one is that the luerl machine is a bit of a hybrid. It uses erlang
> function calls for calling functions and loops while inside a function the
> code is compiled to a VM. What I plan to do is add more info to the luerl
> stack so it can be used to generate a bit of a luerl stacktrace.
>
> Robert
>
>
> On 12 January 2015 at 19:13, Robert Virding <rvirding@REDACTED> wrote:
>
>> Yes, I know.
>>
>> But I am doing some work on the Luerl VM and I am going to try to add
>> more Lua call stack information. Function names can be a bit difficult but
>> line numbers should be easier.
>>
>> Robert
>>
>>
>> On 12 January 2015 at 18:57, Max Lapshin <max.lapshin@REDACTED> wrote:
>>
>>> Hi.
>>>
>>> luerl (https://github.com/rvirding/luerl ) is a wonderful project,
>>> thanks for it.
>>>
>>>
>>> 3 years ago Robert told that it is a big problem to add proper
>>> stacktraces to lua errors.
>>>
>>> Right now it is:
>>>
>>> {lua_error,{undef_function,nil},{luerl,{array,25,100,undefined,{{{table,{array,0,10,nil,10},{{{{empty,<<"_G">>,{tref,0},empty,<<"_VERSION">>,<<"Lua
>>> 5.2">>,empty},<<"assert">>,{function,#Fun<luerl_lib_basic.1.33635960>},{empty,<<"auth_url">>,<<"
>>> http://go.commpass.tv/flussonic/auth
>>> ">>,empty,<<"bit32">>,{tref,11},empty},<<"collectgarbage">>,{function,#Fun<luerl_lib_basic.2.33635960>},{empty,<<"comet">>,{tref,19},empty,<<"converter">>,{tref,18},empty}},<<"dofile">>,{function,#Fun<luerl_lib_basic.3.33635960>},{{empty,<<"eprint">>,{function,#Fun<luerl_lib_basic.4.33635960>},empty},<<"error">>,.....
>>>
>>>
>>> For something like:
>>>
>>> mytable.unexisting_function("Hello world")
>>>
>>>
>>> Are there any severe problems to add stacktraces?
>>>
>>> It would be very good at least to have file and line of the error to
>>> show user where he has error.
>>>
>>>
>>> Perhaps some library function like:  luerl_lib:unpack_stacktrace(Error)
>>> -> ... ?
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> erlang-questions mailing list
>>> erlang-questions@REDACTED
>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150118/826f3a03/attachment.htm>


More information about the erlang-questions mailing list