lua-users home
lua-l archive

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


> 30. Did anyone found what exactly is meant by
> 
>         handling of non-string error messages
> 
> in the Implementation section of the Readme changelist?

You can raise errors on any Lua value, not just strings.
(This much has been true for a long time.) 
What is new is that the standalone interpreter now respects __tostring:

Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> error(io.stdin)
(error object is not a string)

Lua 5.2.0 (work1)  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> error(io.stdin)
file (0xe8b420)