diff options
Diffstat (limited to 'ldblib.c')
| -rw-r--r-- | ldblib.c | 10 |
1 files changed, 2 insertions, 8 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldblib.c,v 1.47 2002/04/09 19:48:08 roberto Exp roberto $ | 2 | ** $Id: ldblib.c,v 1.48 2002/04/22 14:40:50 roberto Exp roberto $ |
| 3 | ** Interface from Lua to its debug API | 3 | ** Interface from Lua to its debug API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -189,7 +189,6 @@ static int errorfb (lua_State *L) { | |||
| 189 | lua_Debug ar; | 189 | lua_Debug ar; |
| 190 | luaL_Buffer b; | 190 | luaL_Buffer b; |
| 191 | luaL_buffinit(L, &b); | 191 | luaL_buffinit(L, &b); |
| 192 | luaL_addstring(&b, "error: "); | ||
| 193 | luaL_addstring(&b, luaL_check_string(L, 1)); | 192 | luaL_addstring(&b, luaL_check_string(L, 1)); |
| 194 | luaL_addstring(&b, "\n"); | 193 | luaL_addstring(&b, "\n"); |
| 195 | while (lua_getstack(L, level++, &ar)) { | 194 | while (lua_getstack(L, level++, &ar)) { |
| @@ -243,12 +242,7 @@ static int errorfb (lua_State *L) { | |||
| 243 | luaL_addstring(&b, "\n"); | 242 | luaL_addstring(&b, "\n"); |
| 244 | } | 243 | } |
| 245 | luaL_pushresult(&b); | 244 | luaL_pushresult(&b); |
| 246 | lua_getglobal(L, LUA_ALERT); | 245 | return 1; |
| 247 | if (lua_isfunction(L, -1)) { /* avoid loop if _ALERT is not defined */ | ||
| 248 | lua_pushvalue(L, -2); /* error message */ | ||
| 249 | lua_rawcall(L, 1, 0); | ||
| 250 | } | ||
| 251 | return 0; | ||
| 252 | } | 246 | } |
| 253 | 247 | ||
| 254 | 248 | ||
