summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-04-01 14:52:31 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-04-01 14:52:31 -0300
commit3a6230ef7c92473db9f2170b72294a8bcdb294e6 (patch)
treed7d44d9cbc76ce84d893234f95e01929adb3d152
parenta424a112b54fb78b0b4f0afed12e5aca8f27c550 (diff)
downloadlua-github-3a6230ef7c92473db9f2170b72294a8bcdb294e6.tar.gz
error-message format
-rw-r--r--lauxlib.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 5975db04..9cfeeb71 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lauxlib.c,v 1.96 2003/03/18 12:25:32 roberto Exp roberto $
+** $Id: lauxlib.c,v 1.97 2003/03/18 18:48:31 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -45,9 +45,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 %s on bad self (perhaps using `:' instead of `.')",
- ar.name);
+ return luaL_error(L, "calling `%s' on bad self (%s)", ar.name, extramsg);
}
if (ar.name == NULL)
ar.name = "?";