aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/socket.html3
-rw-r--r--src/except.c2
-rw-r--r--test/excepttest.lua1
3 files changed, 2 insertions, 4 deletions
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.
167 167
168<p class=parameters> 168<p class=parameters>
169<tt>Finalizer</tt> is a function that will be called before 169<tt>Finalizer</tt> is a function that will be called before
170<tt>try</tt> throws the exception. It will be called 170<tt>try</tt> throws the exception.
171in <em>protected</em> mode.
172</p> 171</p>
173 172
174<p class=return> 173<p class=return>
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) {
49static int finalize(lua_State *L) { 49static int finalize(lua_State *L) {
50 if (!lua_toboolean(L, 1)) { 50 if (!lua_toboolean(L, 1)) {
51 lua_pushvalue(L, lua_upvalueindex(1)); 51 lua_pushvalue(L, lua_upvalueindex(1));
52 lua_pcall(L, 0, 0, 0); 52 lua_call(L, 0, 0);
53 lua_settop(L, 2); 53 lua_settop(L, 2);
54 wrap(L); 54 wrap(L);
55 lua_error(L); 55 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
5local func = socket.protect(function(err, ...) 5local func = socket.protect(function(err, ...)
6 local try = socket.newtry(function() 6 local try = socket.newtry(function()
7 finalizer_called = true 7 finalizer_called = true
8 error("ignored")
9 end) 8 end)
10 9
11 if err then 10 if err then