tv-labs / lua

The most ergomonic interface to Luerl in Elixir
https://hexdocs.pm/lua/
Apache License 2.0
71 stars 0 forks source link

Use :luerl_lib.format_error #11

Closed davydog187 closed 7 months ago

davydog187 commented 7 months ago

From Robert Virding himself

rvirding My target was to specifically detect/handle all the errors that are caused by the Lua code and detected by the emulator. The idea was that it would then be easier for the use to relate to the Lua code and understand what was wrong. Btw there is a luerl_lib:format_error/1 function which prettyprints an error which can be used for outputting to users. This functions just prettyprints unrecognised errors straight out if necessary. There is also luerl_lib:format_value/1 for outputting Luerl values in a readable form (edited)