stand-alone interpreter shows incorrect error message when the

'message' is a coroutine (already fixed in 5.2)
This commit is contained in:
Roberto Ierusalimschy 2007-12-27 10:58:29 -02:00
parent fabdaa37b6
commit fdecdd0cec

21
bugs
View File

@ -1615,6 +1615,27 @@ lapi.c:
]], ]],
} }
Bug{
what = [[stand-alone interpreter shows incorrect error message
when the "message" is a coroutine]],
report = [[Patrick Donnelly, on 17/12/2007]],
since = [[i ]],
example = [[> error(coroutine.create(function() end))]],
patch = [[
lua.c:
@@ -74,6 +74,8 @@
static int traceback (lua_State *L) {
+ if (!lua_isstring(L, 1)) /* 'message' not a string? */
+ return 1; /* keep it intact */
lua_getfield(L, LUA_GLOBALSINDEX, "debug");
if (!lua_istable(L, -1)) {
lua_pop(L, 1);
]],
}
Bug{ Bug{
what = [[ ]], what = [[ ]],
report = [[ , on ]], report = [[ , on ]],