diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-03-19 18:15:18 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-03-19 18:15:18 -0300 |
| commit | 0ca225d33a34377d8339aa562422c0a2918891e2 (patch) | |
| tree | 28b65243970690e6b2e5bd22a2cc03efdf8dfa28 /lua.c | |
| parent | 70e2b7ab8680ca290d4c682705a9d9f5220f6073 (diff) | |
| download | lua-github-0ca225d33a34377d8339aa562422c0a2918891e2.tar.gz | |
better error message
Diffstat (limited to 'lua.c')
| -rw-r--r-- | lua.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.118 2003/03/11 12:24:34 roberto Exp roberto $ +** $Id: lua.c,v 1.119 2003/03/17 13:01:48 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -285,7 +285,8 @@ static void manual_input (void) { lua_getglobal(L, "print"); lua_insert(L, 1); if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != 0) - l_message(progname, "error calling `print'"); + l_message(progname, lua_pushfstring(L, "error calling `print' (%s)", + lua_tostring(L, -1))); } } lua_settop(L, 0); /* clear stack */ |
