mirror of
https://github.com/lua/lua
synced 2024-12-26 20:29:43 +03:00
stand-alone interpreter shows incorrect error message when the
'message' is a coroutine (already fixed in 5.2)
This commit is contained in:
parent
fabdaa37b6
commit
fdecdd0cec
21
bugs
21
bugs
@ -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 ]],
|
||||||
|
Loading…
Reference in New Issue
Block a user