lua-users home
lua-l archive

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


On 2/16/06, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> I'm thinking what would be nice is if error() (and the C versions like
> lua_error) could return more than just a text message.

This is already possible: you can use any Lua value as the "message".
In particular, you can send a complex error message by using a table.

Yes but when these are kicked out of the Lua runtime they won't contain any error message at all.  No?
 
> a = {}
> a.msg = "hello"
> a.code = 12
> error(a)
(error with no message)

--
// Chris