diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-06-13 15:45:35 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-06-13 15:45:35 -0300 |
commit | 480a1da34a496898d4cd3a9c695476e4f0a264fc (patch) | |
tree | eb1816c36f78e30f28395ed518987c213c0591b6 | |
parent | 59e29733353159ecae3b73719043a75097583ccd (diff) | |
download | lua-480a1da34a496898d4cd3a9c695476e4f0a264fc.tar.gz lua-480a1da34a496898d4cd3a9c695476e4f0a264fc.tar.bz2 lua-480a1da34a496898d4cd3a9c695476e4f0a264fc.zip |
when error is 'bad self' original message probably makes no sense, so
it is better not to show it.
-rw-r--r-- | lauxlib.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.176 2008/01/17 16:24:30 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.177 2008/06/12 14:37:27 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -43,8 +43,7 @@ LUALIB_API int luaL_argerror (lua_State *L, int narg, const char *extramsg) { | |||
43 | if (strcmp(ar.namewhat, "method") == 0) { | 43 | if (strcmp(ar.namewhat, "method") == 0) { |
44 | narg--; /* do not count `self' */ | 44 | narg--; /* do not count `self' */ |
45 | if (narg == 0) /* error is in the self argument itself? */ | 45 | if (narg == 0) /* error is in the self argument itself? */ |
46 | return luaL_error(L, "calling " LUA_QS " on bad self (%s)", | 46 | return luaL_error(L, "calling " LUA_QS " on bad self", ar.name); |
47 | ar.name, extramsg); | ||
48 | } | 47 | } |
49 | if (ar.name == NULL) | 48 | if (ar.name == NULL) |
50 | ar.name = "?"; | 49 | ar.name = "?"; |