aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-03-19 18:15:18 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-03-19 18:15:18 -0300
commit0ca225d33a34377d8339aa562422c0a2918891e2 (patch)
tree28b65243970690e6b2e5bd22a2cc03efdf8dfa28
parent70e2b7ab8680ca290d4c682705a9d9f5220f6073 (diff)
downloadlua-0ca225d33a34377d8339aa562422c0a2918891e2.tar.gz
lua-0ca225d33a34377d8339aa562422c0a2918891e2.tar.bz2
lua-0ca225d33a34377d8339aa562422c0a2918891e2.zip
better error message
-rw-r--r--lua.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lua.c b/lua.c
index 8a96a699..6f0c8d07 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.118 2003/03/11 12:24:34 roberto Exp roberto $ 2** $Id: lua.c,v 1.119 2003/03/17 13:01:48 roberto Exp roberto $
3** Lua stand-alone interpreter 3** Lua stand-alone interpreter
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -285,7 +285,8 @@ static void manual_input (void) {
285 lua_getglobal(L, "print"); 285 lua_getglobal(L, "print");
286 lua_insert(L, 1); 286 lua_insert(L, 1);
287 if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != 0) 287 if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != 0)
288 l_message(progname, "error calling `print'"); 288 l_message(progname, lua_pushfstring(L, "error calling `print' (%s)",
289 lua_tostring(L, -1)));
289 } 290 }
290 } 291 }
291 lua_settop(L, 0); /* clear stack */ 292 lua_settop(L, 0); /* clear stack */