lua-users home
lua-l archive

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


Still in section "3.3.8 - To-be-closed Variables", about several
closing method errors:

To quickly test in the Lua REPL, I did:

    > smt = getmetatable('a')
    > function function smt.__close(s) error("err closing ".. s) end

Test with one error:

    > do local <toclose> x='XX' end

    stdin:1: err closing XX
    stack traceback:
        [C]: in function 'error'
        stdin:1: in function <stdin:1>
        stdin:1: in main chunk
        [C]: in ?

Test with two errors:

    > do local <toclose> x='XX'; local <toclose> y='YY'  end

    stdin:1: err closing XX

No stack traceback. Is it normal?

Phil