diff options
author | Christian Pointner <equinox@anylike.org> | 2009-12-25 14:59:06 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anylike.org> | 2009-12-25 14:59:06 +0000 |
commit | 6005bd7ebb71dd2be76c8c07802a945c868dae5a (patch) | |
tree | 5a09a1bdb7ab7ae01d147d3a044be1da9a699eff | |
parent | moved to lua 5.1 (diff) |
luaL_error instead of lua_error
-rw-r--r-- | src/l_log.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/l_log.c b/src/l_log.c index d1ab9c1..ac39487 100644 --- a/src/l_log.c +++ b/src/l_log.c @@ -77,15 +77,11 @@ static int l_log_print(lua_State *L) prio = INFO; else if(!strncmp("DEBUG", prio_str, 6)) prio = DEBUG; - else { - lua_pushstring(L, "invalid log priority"); - lua_error(L); - } - } - else { - lua_pushstring(L, "invalid log priority"); - lua_error(L); + else + return luaL_error(L, "invalid log priority"); } + else + return luaL_error(L, "invalid log priority"); log_printf(prio, "%s", luaL_checklstring(L, 2, NULL)); return 0; |