summaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-12-10 09:30:09 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-12-10 09:30:09 -0200
commitb4633c586b4ca189d3249e8c2b2a695a5280081c (patch)
treece0c3008336e9918a1aa46102a0671d4741faed6 /ldebug.c
parent5fae2a5b05735e2853056ab8c415458a4e31917b (diff)
downloadlua-b4633c586b4ca189d3249e8c2b2a695a5280081c.tar.gz
lua-b4633c586b4ca189d3249e8c2b2a695a5280081c.tar.bz2
lua-b4633c586b4ca189d3249e8c2b2a695a5280081c.zip
error handler does not need to be a function (can be a callable
object)
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ldebug.c b/ldebug.c
index 5ba41c9a..577114e6 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.107 2014/11/11 17:08:19 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.108 2014/12/08 15:48:23 roberto Exp roberto $
3** Debug Interface 3** Debug Interface
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -590,7 +590,6 @@ static void addinfo (lua_State *L, const char *msg) {
590l_noret luaG_errormsg (lua_State *L) { 590l_noret luaG_errormsg (lua_State *L) {
591 if (L->errfunc != 0) { /* is there an error handling function? */ 591 if (L->errfunc != 0) { /* is there an error handling function? */
592 StkId errfunc = restorestack(L, L->errfunc); 592 StkId errfunc = restorestack(L, L->errfunc);
593 if (!ttisfunction(errfunc)) luaD_throw(L, LUA_ERRERR);
594 setobjs2s(L, L->top, L->top - 1); /* move argument */ 593 setobjs2s(L, L->top, L->top - 1); /* move argument */
595 setobjs2s(L, L->top - 1, errfunc); /* push function */ 594 setobjs2s(L, L->top - 1, errfunc); /* push function */
596 L->top++; /* assume EXTRA_STACK */ 595 L->top++; /* assume EXTRA_STACK */