lua-users home
lua-l archive

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


Hi List !

I am trying to prepare an error function before executing a callback from C++. The callback uses it's own lua thread with the following stack (just before the call):

<self> <err_func> <func> <self> <...>

If func(self, ...) fails, I would like to be able to find the "self" table back in the error function. Is this possible ? Do I have to create a different function for each object with an upvalue ?

-- Ideal code
function err(self, msg)
  -- ...
end



                                                               Gaspard