diff options
author | ShadowNinja <shadowninja@minetest.net> | 2013-12-18 16:35:55 -0500 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2013-12-18 16:35:55 -0500 |
commit | 49cec3f78240ed6310a9b5dd05ce09a79ed5a12e (patch) | |
tree | 38e8199e49906357939e74b6ed0b00f6f54de976 /src/script/lua_api/l_item.cpp | |
parent | 38d112033b3ba0ea0360fced334a279576aafc5d (diff) | |
download | minetest-49cec3f78240ed6310a9b5dd05ce09a79ed5a12e.tar.gz minetest-49cec3f78240ed6310a9b5dd05ce09a79ed5a12e.tar.bz2 minetest-49cec3f78240ed6310a9b5dd05ce09a79ed5a12e.zip |
Handle LuaErrors in Lua -> C++ calls on LuaJIT
Diffstat (limited to 'src/script/lua_api/l_item.cpp')
-rw-r--r-- | src/script/lua_api/l_item.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/lua_api/l_item.cpp b/src/script/lua_api/l_item.cpp index 512cd7398..4b5c89792 100644 --- a/src/script/lua_api/l_item.cpp +++ b/src/script/lua_api/l_item.cpp @@ -470,7 +470,7 @@ int ModApiItemMod::l_register_item_raw(lua_State *L) name = lua_tostring(L, -1); verbosestream<<"register_item_raw: "<<name<<std::endl; } else { - throw LuaError(L, "register_item_raw: name is not defined or not a string"); + throw LuaError(NULL, "register_item_raw: name is not defined or not a string"); } // Check if on_use is defined @@ -500,7 +500,7 @@ int ModApiItemMod::l_register_item_raw(lua_State *L) content_t id = ndef->set(f.name, f); if(id > MAX_REGISTERED_CONTENT){ - throw LuaError(L, "Number of registerable nodes (" + throw LuaError(NULL, "Number of registerable nodes (" + itos(MAX_REGISTERED_CONTENT+1) + ") exceeded (" + name + ")"); } |