diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2007-12-27 10:58:29 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2007-12-27 10:58:29 -0200 |
commit | fdecdd0cec3331605be887176f37b9c9dbcb045e (patch) | |
tree | ea5b53f305bcc1c3aeb17496831aaefb8c03ad5d /bugs | |
parent | fabdaa37b62ee9daf2d87a1e6a587820e47a3a34 (diff) | |
download | lua-fdecdd0cec3331605be887176f37b9c9dbcb045e.tar.gz lua-fdecdd0cec3331605be887176f37b9c9dbcb045e.tar.bz2 lua-fdecdd0cec3331605be887176f37b9c9dbcb045e.zip |
stand-alone interpreter shows incorrect error message when the
'message' is a coroutine (already fixed in 5.2)
Diffstat (limited to 'bugs')
-rw-r--r-- | bugs | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -1616,6 +1616,27 @@ lapi.c: | |||
1616 | } | 1616 | } |
1617 | 1617 | ||
1618 | Bug{ | 1618 | Bug{ |
1619 | what = [[stand-alone interpreter shows incorrect error message | ||
1620 | when the "message" is a coroutine]], | ||
1621 | report = [[Patrick Donnelly, on 17/12/2007]], | ||
1622 | since = [[i ]], | ||
1623 | example = [[> error(coroutine.create(function() end))]], | ||
1624 | patch = [[ | ||
1625 | lua.c: | ||
1626 | @@ -74,6 +74,8 @@ | ||
1627 | |||
1628 | |||
1629 | static int traceback (lua_State *L) { | ||
1630 | + if (!lua_isstring(L, 1)) /* 'message' not a string? */ | ||
1631 | + return 1; /* keep it intact */ | ||
1632 | lua_getfield(L, LUA_GLOBALSINDEX, "debug"); | ||
1633 | if (!lua_istable(L, -1)) { | ||
1634 | lua_pop(L, 1); | ||
1635 | |||
1636 | ]], | ||
1637 | } | ||
1638 | |||
1639 | Bug{ | ||
1619 | what = [[ ]], | 1640 | what = [[ ]], |
1620 | report = [[ , on ]], | 1641 | report = [[ , on ]], |
1621 | since = [[i ]], | 1642 | since = [[i ]], |