lua-users home
lua-l archive

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


On 01/11/2014 11.39, Lorenzo Donati wrote:
I think this is a bad idea in itself.  any message generated by the
engine itself should be considered part of the implementation, not to
be shown to a user.

I strongly agree!

I think most of us agree on that. What I would like to have is a way to identify an error made by an user within a Lua-base domain-specific language, so that I could show an appropriate message (where "appropriate" could mean application-related, simplified and/or translated).

Currently the information available from pcall() and (indirectly) from xpcall() is the default "error object", which is a string. File name and line number are easily parsed from that string, error type and parameters are not.

Maybe I am just missing something obvious. How do Lua-scriptable games handle error feedback in user scripts?

--
  Enrico