diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-03-18 07:18:27 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-03-18 07:18:27 -0500 |
commit | a2a8978f07e268b439164ec0cf8cbaccce9e93e1 (patch) | |
tree | 538879fefac26276e94af2d2efbe8ccc2e591d45 | |
parent | 294bdec0c0efb9d1bdb3a495ebf3d602e3ee4fc2 (diff) | |
download | luancurses-a2a8978f07e268b439164ec0cf8cbaccce9e93e1.tar.gz luancurses-a2a8978f07e268b439164ec0cf8cbaccce9e93e1.zip |
better error messages
-rw-r--r-- | src/curses.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/curses.c b/src/curses.c index ee0e03a..77e671d 100644 --- a/src/curses.c +++ b/src/curses.c @@ -280,7 +280,7 @@ static int l_init_pair(lua_State* L) lua_getfield(L, -1, "colors"); lua_getfield(L, -1, fg); if (lua_isnil(L, -1)) { - return luaL_error(L, "init_pair: Trying to use a non-existant foreground color"); + return luaL_error(L, "init_pair: Trying to use a non-existant foreground color: \"%s\"", fg); } fg_val = lua_tointeger(L, -1); lua_pop(L, 1); @@ -288,7 +288,7 @@ static int l_init_pair(lua_State* L) /* and background value */ lua_getfield(L, -1, bg); if (lua_isnil(L, -1)) { - return luaL_error(L, "init_pair: Trying to use a non-existant background color"); + return luaL_error(L, "init_pair: Trying to use a non-existant background color: \"%s\"", bg); } bg_val = lua_tointeger(L, -1); lua_pop(L, 3); |