diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-12-23 10:50:49 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-12-23 10:50:49 -0200 |
commit | 807ba6301c949cb42bd9390d737938c51dd5784c (patch) | |
tree | 1878a80d6d84741e5dd162f76b2232152e4dd225 | |
parent | 03f3f9e707ceaf46efb4917f8d32ea62283b9358 (diff) | |
download | lua-807ba6301c949cb42bd9390d737938c51dd5784c.tar.gz lua-807ba6301c949cb42bd9390d737938c51dd5784c.tar.bz2 lua-807ba6301c949cb42bd9390d737938c51dd5784c.zip |
error method *always* gets a string (otherwise it is not called at all)
-rw-r--r-- | ldo.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.17 1997/12/18 18:32:39 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.18 1997/12/22 20:57:18 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -38,9 +38,7 @@ | |||
38 | 38 | ||
39 | static void stderrorim (void) | 39 | static void stderrorim (void) |
40 | { | 40 | { |
41 | lua_Object s = lua_getparam(1); | 41 | fprintf(stderr, "lua error: %s\n", lua_getstring(lua_getparam(1))); |
42 | if (lua_isstring(s)) | ||
43 | fprintf(stderr, "lua error: %s\n", lua_getstring(s)); | ||
44 | } | 42 | } |
45 | 43 | ||
46 | 44 | ||