You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lua.call_function/3 expected to return Lua.RuntimeException instead of string with ANSI codes #342
Hey @davydog187, i probably did not transport my thinking well enough. Why can't we just have the full error struct instead of the string error?
importLuachunk=~LUA"""function foo() for i in pairs("asdf") do print(i) endend"""c{_,lua}=Lua.eval!(chunk)Lua.call_function(lua,[:foo],[])|>dbg()
Could return:
{:error,%Lua.RuntimeException{...},lua}
Then we still can print it with Lua.RuntimeException.message(ex) or define a custom way to represent the error back to the user. With a string we loose all metadata like line, source or original
Activity
kevinschweikert commentedon Jun 10, 2026
Running on:
kevinschweikert commentedon Jun 10, 2026
Duplicate of #336
kevinschweikert commentedon Jun 10, 2026
Also, why is it
no sourceinstead of line 2?kevinschweikert commentedon Jun 12, 2026
Hey @davydog187, i probably did not transport my thinking well enough. Why can't we just have the full error struct instead of the string error?
Could return:
Then we still can print it with
Lua.RuntimeException.message(ex)or define a custom way to represent the error back to the user. With a string we loose all metadata likeline,sourceororiginal