context in error handler
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: context in error handler
- From: Gaspard Bucher <gaspard@...>
- Date: 2012年1月25日 14:42:23 +0100
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