From a2a8978f07e268b439164ec0cf8cbaccce9e93e1 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Tue, 18 Mar 2008 07:18:27 -0500 Subject: better error messages --- src/curses.c | 4 ++-- 1 file 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); -- cgit v1.2.3