src/lua_objs.c
changeset 106 f00661136ac2
parent 105 b6b183fbf373
child 107 5c1eeb45c7f2
--- a/src/lua_objs.c	Wed Apr 01 00:57:34 2009 +0300
+++ b/src/lua_objs.c	Wed Apr 01 01:41:08 2009 +0300
@@ -589,15 +589,9 @@
     return 0;
 }
 
-err_t lua_objs_init (struct nexus_lua *lua)
+err_t lua_objs_init (struct nexus_lua *lua, struct error_info *err)
 {
     // call in protected mode
-    switch (lua_cpcall(lua->st, &_lua_objs_init, lua->nexus)) {
-        case 0:             return SUCCESS;
-        case LUA_ERRRUN:    return ERR_LUA_RUN;
-        case LUA_ERRMEM:    return ERR_LUA_MEM;
-        case LUA_ERRERR:    return ERR_LUA_ERR;
-        default:            return ERR_UNKNOWN;
-    }
+    return nexus_lua_error(lua->st, lua_cpcall(lua->st, &_lua_objs_init, lua->nexus), err);
 }