diff --git a/doc/socket.html b/doc/socket.html index a43a208..08ef784 100644 --- a/doc/socket.html +++ b/doc/socket.html @@ -167,8 +167,7 @@ is raised.

Finalizer is a function that will be called before -try throws the exception. It will be called -in protected mode. +try throws the exception.

diff --git a/src/except.c b/src/except.c index def35a0..309f8f0 100644 --- a/src/except.c +++ b/src/except.c @@ -49,7 +49,7 @@ static void wrap(lua_State *L) { static int finalize(lua_State *L) { if (!lua_toboolean(L, 1)) { lua_pushvalue(L, lua_upvalueindex(1)); - lua_pcall(L, 0, 0, 0); + lua_call(L, 0, 0); lua_settop(L, 2); wrap(L); lua_error(L); diff --git a/test/excepttest.lua b/test/excepttest.lua index 6904545..80c9cb8 100644 --- a/test/excepttest.lua +++ b/test/excepttest.lua @@ -5,7 +5,6 @@ local finalizer_called local func = socket.protect(function(err, ...) local try = socket.newtry(function() finalizer_called = true - error("ignored") end) if err then