diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-12-23 12:06:57 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-12-23 12:06:57 -0200 |
commit | d3ac7075a25a28d2968efd5600041dddcdb8a9d2 (patch) | |
tree | a8e035bf0914cf166093e5526488231586ae0061 /ltm.c | |
parent | 0c9080c7a9c2e0f9ee39a887bbde5385160b9747 (diff) | |
download | lua-d3ac7075a25a28d2968efd5600041dddcdb8a9d2.tar.gz lua-d3ac7075a25a28d2968efd5600041dddcdb8a9d2.tar.bz2 lua-d3ac7075a25a28d2968efd5600041dddcdb8a9d2.zip |
better error message
Diffstat (limited to 'ltm.c')
-rw-r--r-- | ltm.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.c,v 1.16 1998/06/18 16:57:03 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 1.17 1998/08/21 17:43:44 roberto Exp roberto $ |
3 | ** Tag methods | 3 | ** Tag methods |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -148,8 +148,10 @@ void luaT_settagmethod (int t, char *event, TObject *func) | |||
148 | int e = luaI_checkevent(event, luaT_eventname); | 148 | int e = luaI_checkevent(event, luaT_eventname); |
149 | checktag(t); | 149 | checktag(t); |
150 | if (!validevent(t, e)) | 150 | if (!validevent(t, e)) |
151 | luaL_verror("settagmethod: cannot change tag method `%.20s' for tag %d", | 151 | luaL_verror("cannot change tag method `%.20s' for type `%.20s'%.20s", |
152 | luaT_eventname[e], t); | 152 | luaT_eventname[e], luaO_typenames[-t], |
153 | (t == LUA_T_ARRAY || t == LUA_T_USERDATA) ? " with default tag" | ||
154 | : ""); | ||
153 | *func = *luaT_getim(t,e); | 155 | *func = *luaT_getim(t,e); |
154 | *luaT_getim(t, e) = temp; | 156 | *luaT_getim(t, e) = temp; |
155 | } | 157 | } |