<div dir="ltr"><div>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.<br><br></div>Robert<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 January 2015 at 19:13, Robert Virding <span dir="ltr"><<a href="mailto:rvirding@gmail.com" target="_blank">rvirding@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Yes, I know.<br><br></div>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.<br><br></div>Robert<br> <br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 12 January 2015 at 18:57, Max Lapshin <span dir="ltr"><<a href="mailto:max.lapshin@gmail.com" target="_blank">max.lapshin@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi.<div><br></div><div>luerl (<a href="https://github.com/rvirding/luerl" target="_blank">https://github.com/rvirding/luerl</a> ) is a wonderful project, thanks for it.</div><div><br></div><div><br></div><div>3 years ago Robert told that it is a big problem to add proper stacktraces to lua errors.</div><div><br></div><div>Right now it is:</div><div><br></div><div>
<p>{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">>,<<"<a href="http://go.commpass.tv/flussonic/auth" target="_blank">http://go.commpass.tv/flussonic/auth</a>">>,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">>,.....</p><p><br></p><p>For something like:</p><p>mytable.unexisting_function("Hello world")</p><p><br></p><p>Are there any severe problems to add stacktraces?</p><p>It would be very good at least to have file and line of the error to show user where he has error.</p><p><br></p><p>Perhaps some library function like: luerl_lib:unpack_stacktrace(Error) -> ... ?</p><p><br></p><p><br></p></div></div>
<br></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>