diff options
-rw-r--r-- | lbaselib.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.115 2002/12/06 17:05:15 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.116 2002/12/20 09:55:56 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -573,7 +573,14 @@ static int luaB_coresume (lua_State *L) { | |||
573 | static int luaB_auxwrap (lua_State *L) { | 573 | static int luaB_auxwrap (lua_State *L) { |
574 | lua_State *co = lua_tothread(L, lua_upvalueindex(1)); | 574 | lua_State *co = lua_tothread(L, lua_upvalueindex(1)); |
575 | int r = auxresume(L, co, lua_gettop(L)); | 575 | int r = auxresume(L, co, lua_gettop(L)); |
576 | if (r < 0) lua_error(L); /* propagate error */ | 576 | if (r < 0) { |
577 | if (lua_isstring(L, -1)) { /* error object is a string? */ | ||
578 | luaL_where(L, 1); /* add extra info */ | ||
579 | lua_insert(L, -2); | ||
580 | lua_concat(L, 2); | ||
581 | } | ||
582 | lua_error(L); /* propagate error */ | ||
583 | } | ||
577 | return r; | 584 | return r; |
578 | } | 585 | } |
579 | 586 | ||