commit 480a1da34a496898d4cd3a9c695476e4f0a264fc
parent 59e29733353159ecae3b73719043a75097583ccd
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Fri, 13 Jun 2008 15:45:12 -0300
when error is 'bad self' original message probably makes no sense, so
it is better not to show it.
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lauxlib.c b/lauxlib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lauxlib.c,v 1.176 2008/01/17 16:24:30 roberto Exp roberto $
+** $Id: lauxlib.c,v 1.177 2008/06/12 14:37:27 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -43,8 +43,7 @@ LUALIB_API int luaL_argerror (lua_State *L, int narg, const char *extramsg) {
if (strcmp(ar.namewhat, "method") == 0) {
narg--; /* do not count `self' */
if (narg == 0) /* error is in the self argument itself? */
- return luaL_error(L, "calling " LUA_QS " on bad self (%s)",
- ar.name, extramsg);
+ return luaL_error(L, "calling " LUA_QS " on bad self", ar.name);
}
if (ar.name == NULL)
ar.name = "?";